limit visibility of ffs function declaration to _XOPEN_SOURCE
authorRich Felker <dalias@aerifal.cx>
Thu, 31 Jul 2014 06:33:17 +0000 (02:33 -0400)
committerRich Felker <dalias@aerifal.cx>
Thu, 31 Jul 2014 06:33:17 +0000 (02:33 -0400)
per the standard, ffs is XSI shaded, whereas the other functions in
this header are in the base.

include/strings.h

index 2b7e086..4d7d69c 100644 (file)
@@ -20,7 +20,9 @@ char *index (const char *, int);
 char *rindex (const char *, int);
 #endif
 
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)  || defined(_BSD_SOURCE)
 int ffs (int);
+#endif
 
 int strcasecmp (const char *, const char *);
 int strncasecmp (const char *, const char *, size_t);