Skip to content

Commit

Permalink
Fix duplicated symbol define
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Jun 26, 2014
1 parent 04ac654 commit 9a9572a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/r3_str.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,20 @@ void print_indent(int level);


#if _GNU_SOURCE || POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700 || __DARWIN_C_LEVEL >= 200809L
#ifndef HAVE_STRNDUP
#define HAVE_STRNDUP
#endif
#endif

#if _SVID_SOURCE || _BSD_SOURCE \
|| _XOPEN_SOURCE >= 500 \
|| _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED \
|| /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L \
|| __DARWIN_C_LEVEL >= 200809L
#ifndef HAVE_STRDUP
#define HAVE_STRDUP
#endif
#endif

#ifndef HAVE_STRDUP
char *strdup(const char *s);
Expand Down

0 comments on commit 9a9572a

Please sign in to comment.