From 8cce6dc19907ba44e29555fa83168619365beb32 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sun, 4 Jan 2015 18:26:31 +0100 Subject: make defines more portable Looks like _DEFAULT_SOURCE requires a recent glibc and does not work on Fedora. So use _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED instead. Reported-by: Benjamin Pereto --- bin/ykfde-cpio.c | 7 +++++-- bin/ykfde.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/ykfde-cpio.c b/bin/ykfde-cpio.c index 860c93b..996af04 100644 --- a/bin/ykfde-cpio.c +++ b/bin/ykfde-cpio.c @@ -8,8 +8,11 @@ * $ gcc -o mkcpio mkcpio.c -larchive */ -#ifndef _DEFAULT_SOURCE -#define _DEFAULT_SOURCE +#ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE +# ifndef _XOPEN_SOURCE_EXTENDED +# define _XOPEN_SOURCE_EXTENDED +# endif #endif #include diff --git a/bin/ykfde.c b/bin/ykfde.c index 182f840..663d198 100644 --- a/bin/ykfde.c +++ b/bin/ykfde.c @@ -8,8 +8,11 @@ * $ gcc -o ykfde ykfde.c -lykpers-1 -lyubikey -lcryptsetup -liniparser */ -#ifndef _DEFAULT_SOURCE -#define _DEFAULT_SOURCE +#ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE +# ifndef _XOPEN_SOURCE_EXTENDED +# define _XOPEN_SOURCE_EXTENDED +# endif #endif #include -- cgit v1.2.3-70-g09d2