linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Olliver Schinagl <oliver@schinagl.nl>
To: linux-mtd@lists.infradead.org
Cc: Olliver Schinagl <oliver@schinagl.nl>
Subject: [PATCH 3/3] unittests: Define the use of _GNU_SOURCE
Date: Mon, 15 Apr 2019 10:20:31 +0200	[thread overview]
Message-ID: <20190415082031.600-4-oliver@schinagl.nl> (raw)
In-Reply-To: <20190415082031.600-1-oliver@schinagl.nl>

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>
---
 tests/unittests/Makemodule.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/unittests/Makemodule.am b/tests/unittests/Makemodule.am
index b7ae575..df1041d 100644
--- a/tests/unittests/Makemodule.am
+++ b/tests/unittests/Makemodule.am
@@ -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 \
-- 
2.20.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  parent reply	other threads:[~2019-04-15  8:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15  8:20 Allow tests to work on more platforms Olliver Schinagl
2019-04-15  8:20 ` [PATCH 1/3] unittests/test_lib: Include proper header for _IOC_SIZE Olliver Schinagl
2019-04-15  8:20 ` [PATCH 2/3] unittests/libmtd_test: Include fcntl header Olliver Schinagl
2019-04-15  8:20 ` Olliver Schinagl [this message]
2019-04-25  6:27 ` Allow tests to work on more platforms David Oberhollenzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190415082031.600-4-oliver@schinagl.nl \
    --to=oliver@schinagl.nl \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).