Ticket #20902: patch-avoid-builtin-strndup.diff

File patch-avoid-builtin-strndup.diff, 550 bytes (added by kiwi.2008@…, 15 years ago)

Avoid conflict with builtin strndup function

  • src/hosts.c

    old new  
    125125int dcc_compare_container(const void *a, const void *b);
    126126
    127127
    128 #ifndef HAVE_STRNDUP
     128#if !HAVE_STRNDUP
    129129/**
    130130 * Copy at most @p size characters from @p src, plus a terminating nul.
    131131 *
    132132 * Really this needs to be in util.c, but it's only used here.
    133133 **/
    134 static char *strndup(const char *src, size_t size)
     134char *strndup(const char *src, size_t size);
     135char *strndup(const char *src, size_t size)
    135136{
    136137    char *dst;
    137138