diff options
author | Florian Weimer via Gnupg-devel <[email protected]> | 2023-01-27 12:11:08 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2023-01-30 15:33:44 +0000 |
commit | 23745cddcc4814b3d5c544100eb371b3e7d187b8 (patch) | |
tree | 1620c4f967cbaf574ef04c274a9adff35559f370 | |
parent | build: Add m4/extern-inline.m4 from gnulib. (diff) | |
download | gnupg-STABLE-BRANCH-1-4.tar.gz gnupg-STABLE-BRANCH-1-4.zip |
C99 compatibility fixes for gnupg 1STABLE-BRANCH-1-4
--
Include <stdlib.h> for the exit function. This avoids a failing
GNUPG_CHECK_IPC check in case the compiler no longer supports implicit
function declarations.
Explicitly declare the return type of main as int. This too avoids
failures with future compilers.
-rw-r--r-- | acinclude.m4 | 1 | ||||
-rw-r--r-- | configure.ac | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 44dfd85a9..ed4992e71 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -314,6 +314,7 @@ define(GNUPG_CHECK_IPC, #include <sys/types.h> #include <sys/ipc.h> #include <sys/shm.h> + #include <stdlib.h> int main() { int id; diff --git a/configure.ac b/configure.ac index 0c24a4379..9acbfa838 100644 --- a/configure.ac +++ b/configure.ac @@ -1272,7 +1272,7 @@ if test "$use_regex" = yes ; then AC_TRY_RUN([ #include <unistd.h> #include <regex.h> -main() { regex_t blah ; regmatch_t p; p.rm_eo = p.rm_eo; return regcomp(&blah, "foo.*bar", REG_NOSUB) || regexec (&blah, "foobar", 0, NULL, 0); }], +int main(void) { regex_t blah ; regmatch_t p; p.rm_eo = p.rm_eo; return regcomp(&blah, "foo.*bar", REG_NOSUB) || regexec (&blah, "foobar", 0, NULL, 0); }], gnupg_cv_regex_broken=no, gnupg_cv_regex_broken=yes, gnupg_cv_regex_broken=yes)) if test $gnupg_cv_regex_broken = yes ; then |