]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: fd-4.c redefines mode_t on AIX.
authorDavid Edelsohn <dje.gcc@gmail.com>
Thu, 11 Aug 2022 20:26:37 +0000 (16:26 -0400)
committerDavid Edelsohn <dje.gcc@gmail.com>
Thu, 11 Aug 2022 21:43:03 +0000 (17:43 -0400)
AIX stdio.h includes sys/types.h, which defines mode_t.  The
analyzer/fd-4.c testcase provides a definition of mode_t for creat()
call, which conflicts with the AIX definition.  This patch defines an
AIX macro to prevent multiple-definition of the type.

gcc/testsuite/ChangeLog:

* gcc.dg/analyzer/fd-4.c: Define _MODE_T on AIX.

gcc/testsuite/gcc.dg/analyzer/fd-4.c

index 6b8fca5408fe7a67a5f3f22e31365fb68fd54bf9..842a26b43647fc8b273a54b388359f68d203eb40 100644 (file)
@@ -1,3 +1,6 @@
+#ifdef _AIX
+#define _MODE_T
+#endif
 #include <stdio.h>
 
 int open(const char *, int mode);