[PATCH gnupg] tests:gpgscm: Fix build error on AIX.

Collin Funk via Gnupg-devel <[email protected]>
Newsgroups gmane.comp.encryption.gpg.devel
Message-ID <[email protected]>
* tests/gpgscm/ffi.c (ffi_init): Undefine 'open' so it does not get
expanded to 'open64' in the ffi_define_function macro.

--
GnuPG-bug-id: 7632
Signed-off-by: Collin Funk <[email protected]>
---
 tests/gpgscm/ffi.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/gpgscm/ffi.c b/tests/gpgscm/ffi.c
index 21ec6a057..cdb794ad0 100644
--- a/tests/gpgscm/ffi.c
+++ b/tests/gpgscm/ffi.c
@@ -1667,6 +1667,11 @@ ffi_init (scheme *sc, const char *argv0, const char *scriptname,
   ffi_define_function (sc, getenv);
   ffi_define_function (sc, setenv);
   ffi_define_function_name (sc, "_exit", exit);
+  /* AIX defines open to open64 which breaks the macro expansion to
+     'do_open' if it is not undefined.  */
+#ifdef open
+# undef open
+#endif
   ffi_define_function (sc, open);
   ffi_define_function (sc, fdopen);
   ffi_define_function (sc, close);
-- 
2.49.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.