aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/ffi.c
diff options
context:
space:
mode:
authorCollin Funk via Gnupg-devel <[email protected]>2025-05-01 06:23:58 +0000
committerWerner Koch <[email protected]>2025-05-08 08:23:27 +0000
commit598296b9fc60c3e8bba5b9e7ea8cdeb41d950edd (patch)
treec058230747611b7783868c2848ad57d1636bb4e1 /tests/gpgscm/ffi.c
parentcommon: Add Solaris support to get_signal_name. (diff)
downloadgnupg-598296b9fc60c3e8bba5b9e7ea8cdeb41d950edd.tar.gz
gnupg-598296b9fc60c3e8bba5b9e7ea8cdeb41d950edd.zip
tests:gpgscm: Fix build error on AIX.
* 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]>
Diffstat (limited to 'tests/gpgscm/ffi.c')
-rw-r--r--tests/gpgscm/ffi.c5
1 files changed, 5 insertions, 0 deletions
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);