about summary refs log tree commit diff
path: root/wcsmbs
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs')
-rw-r--r--wcsmbs/Makefile3
-rw-r--r--wcsmbs/tst-wchar-h.c9
2 files changed, 11 insertions, 1 deletions
diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile
index d033de931c..78b3e5b4e7 100644
--- a/wcsmbs/Makefile
+++ b/wcsmbs/Makefile
@@ -40,7 +40,7 @@ routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
 	    wcsmbsload mbsrtowcs_l
 
 tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \
-	 tst-wcrtomb tst-wcpncpy tst-mbsrtowcs
+	 tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h
 
 include ../Rules
 
@@ -62,6 +62,7 @@ CFLAGS-wcstoull_l.c = $(strtox-CFLAGS)
 CFLAGS-wcstod_l.c = $(strtox-CFLAGS)
 CFLAGS-wcstold_l.c = $(strtox-CFLAGS)
 CFLAGS-wcstof_l.c = $(strtox-CFLAGS)
+CFLAGS-tst-wchar-h.c = -D_FORTIFY_SOURCE=2
 
 tst-btowc-ENV = LOCPATH=$(common-objpfx)localedata
 tst-mbrtowc-ENV = LOCPATH=$(common-objpfx)localedata
diff --git a/wcsmbs/tst-wchar-h.c b/wcsmbs/tst-wchar-h.c
new file mode 100644
index 0000000000..4cf2dd0690
--- /dev/null
+++ b/wcsmbs/tst-wchar-h.c
@@ -0,0 +1,9 @@
+#include <stdlib.h>
+#include <wchar.h>
+
+int
+main (void)
+{
+  mbstate_t x;
+  return sizeof (x) - sizeof (mbstate_t);
+}