]> www.infradead.org Git - mtd-utils.git/commitdiff
unittests: Define the use of _GNU_SOURCE
authorOlliver Schinagl <oliver@schinagl.nl>
Mon, 15 Apr 2019 08:20:31 +0000 (10:20 +0200)
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Thu, 25 Apr 2019 06:24:36 +0000 (08:24 +0200)
The unittest suite actually makes use of some _GNU extensions during the
build (loff_t for example). So lets enable this in the makefile.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
tests/unittests/Makemodule.am

index b7ae575245971bd153f5789ee87d88e00a8c2c40..df1041df7855cf0e6d3130e7b4fe6bfb7c5e93ad 100644 (file)
@@ -6,7 +6,7 @@ ubilib_test_CPPFLAGS = -O0 --std=gnu99 $(CMOCKA_CFLAGS) -I$(top_srcdir)/include
 mtdlib_test_SOURCES = tests/unittests/libmtd_test.c lib/libmtd.c lib/libmtd_legacy.c
 mtdlib_test_LDADD = $(CMOCKA_LIBS)
 mtdlib_test_LDFLAGS = -Wl,--wrap=open -Wl,--wrap=close -Wl,--wrap=ioctl -Wl,--wrap=read -Wl,--wrap=lseek -Wl,--wrap=write
-mtdlib_test_CPPFLAGS = -O0 --std=gnu99 $(CMOCKA_CFLAGS) -I$(top_srcdir)/lib/ -I$(top_srcdir)/include -DSYSFS_ROOT='"$(top_srcdir)/tests/unittests/sysfs_mock"'
+mtdlib_test_CPPFLAGS = -O0 -D_GNU_SOURCE --std=gnu99 $(CMOCKA_CFLAGS) -I$(top_srcdir)/lib/ -I$(top_srcdir)/include -DSYSFS_ROOT='"$(top_srcdir)/tests/unittests/sysfs_mock"'
 
 TEST_BINS = \
        ubilib_test \