diff --git a/config.mk b/config.mk index 5cad7038..f21b9aee 100644 --- a/config.mk +++ b/config.mk @@ -4,6 +4,7 @@ VERSION ?= ${shell git describe --dirty} app ?= 0 curl ?= 1 debug ?= 0 +glibc ?= 0 exif ?= 0 help ?= 0 magic ?= 0 @@ -57,6 +58,10 @@ else MAN_DEBUG = . endif +ifeq (${glibc},1) + CFLAGS += -DHAVE_GNU +endif + ifeq (${help},1) CFLAGS += -DINCLUDE_HELP endif diff --git a/src/imlib.c b/src/imlib.c index eb3f5224..259e45f6 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -24,6 +24,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/* + * mkstemps(3) is a nonstandard extension that requires defining + * _GNU_SOURCE for glibc + */ +#ifdef HAVE_GNU +#define _GNU_SOURCE +#endif + #include "feh.h" #include "filelist.h" #include "signals.h"