diff Makefile @ 8:25e227eba3da

Fix asprintf compatibility code Ensure compat/asprintf.o is built on platforms not providing asprintf. Define the _GNU_SOURCE feature macro for the glib asprintf prototype.
author Guido Berhoerster <guido+pwm@berhoerster.name>
date Fri, 28 Jul 2017 08:20:38 +0200
parents 4269feba381e
children 8768fbd09bc5
line wrap: on
line diff
--- a/Makefile	Fri Jul 28 08:11:30 2017 +0200
+++ b/Makefile	Fri Jul 28 08:20:38 2017 +0200
@@ -136,6 +136,11 @@
 XCPPFLAGS =	-DPACKAGE=\"$(PACKAGE)\" \
 		-DVERSION=\"$(VERSION)\"
 LDLIBS =	-lpws -lnettle
+ifeq ($(HAVE_ASPRINTF),1)
+  XCPPFLAGS +=	-DHAVE_ASPRINTF
+else
+  OBJS +=	compat/asprintf.o
+endif
 ifeq ($(HAVE_ERR_H),1)
   XCPPFLAGS +=	-DHAVE_ERR_H
 else