]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
include: Adjust closefrom() per glibc adoption
authorCallum Farmer <callumjfarmer13@gmail.com>
Thu, 16 Feb 2023 21:26:05 +0000 (21:26 +0000)
committerGuillem Jover <guillem@hadrons.org>
Fri, 17 Feb 2023 21:29:26 +0000 (22:29 +0100)
Added in glibc 2.34
https://sourceware.org/git/?p=glibc.git;a=commit;h=607449506f197cc9514408908f41f22537a47a8c

Signed-off-by: Guillem Jover <guillem@hadrons.org>
include/bsd/unistd.h

index 167241b4b56b9ae61894eef7c33dfe28ebba32e0..20b09931633604f261c942e1e1b031a75e8cc9f9 100644 (file)
@@ -59,7 +59,11 @@ int bsd_getopt(int argc, char * const argv[], const char *shortopts);
 mode_t getmode(const void *set, mode_t mode);
 void *setmode(const char *mode_str);
 
+#if !defined(__GLIBC__) || \
+    !__GLIBC_PREREQ(2, 34) || \
+    !defined(_DEFAULT_SOURCE)
 void closefrom(int lowfd);
+#endif
 
 /* Compatibility with sendmail implementations. */
 #define initsetproctitle(c, a, e) setproctitle_init((c), (a), (e))