]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Define _POSIX_C_SOURCE if undefined
authorKhem Raj <raj.khem@gmail.com>
Thu, 14 Jan 2016 06:32:38 +0000 (22:32 -0800)
committerNeilBrown <neilb@suse.com>
Thu, 14 Jan 2016 21:36:19 +0000 (08:36 +1100)
config.c uses _POSIX_C_SOURCE which is defined in features.h when
glibc/uclibc is used, but isn't defined when musl is used.
So provide a reasonable default.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.com>
config.c

index c58c8fe62424301013572a6103f4d801cdf69f5a..b308b6cc5bac58fb42cbde97f35d83595be4b9d2 100644 (file)
--- a/config.c
+++ b/config.c
@@ -63,6 +63,9 @@
  * but may not wrap over lines
  *
  */
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809L
+#endif
 
 #ifndef CONFFILE
 #define CONFFILE "/etc/mdadm.conf"