summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-02-12 02:02:13 +0000
committerSam James <sam@gentoo.org>2023-02-12 02:04:14 +0000
commit7e2da48dc49a0d45dc9d6bcc0553c9dd94a66b0e (patch)
treecea7987e3046f8d105d21d243550055c3e670a99 /sys-libs/db
parentapp-misc/delay: fix clang 16 (again) (diff)
downloadgentoo-7e2da48dc49a0d45dc9d6bcc0553c9dd94a66b0e.tar.gz
gentoo-7e2da48dc49a0d45dc9d6bcc0553c9dd94a66b0e.tar.bz2
gentoo-7e2da48dc49a0d45dc9d6bcc0553c9dd94a66b0e.zip
sys-libs/db: fix configure w/ clang 16
Closes: https://bugs.gentoo.org/883413 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs/db')
-rw-r--r--sys-libs/db/db-4.8.30-r8.ebuild (renamed from sys-libs/db/db-4.8.30-r7.ebuild)3
-rw-r--r--sys-libs/db/db-5.3.28-r9.ebuild (renamed from sys-libs/db/db-5.3.28-r8.ebuild)3
-rw-r--r--sys-libs/db/files/db-4.8.30-clang16.patch281
-rw-r--r--sys-libs/db/files/db-5.3.28-clang16.patch325
4 files changed, 610 insertions, 2 deletions
diff --git a/sys-libs/db/db-4.8.30-r7.ebuild b/sys-libs/db/db-4.8.30-r8.ebuild
index 776ad34df993..e40d00b495fe 100644
--- a/sys-libs/db/db-4.8.30-r7.ebuild
+++ b/sys-libs/db/db-4.8.30-r8.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -41,6 +41,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-4.8-libtool.patch
"${FILESDIR}"/${PN}-4.8.30-rename-atomic-compare-exchange.patch
"${FILESDIR}"/${PN}-4.8-wformat-security.patch
+ "${FILESDIR}"/${PN}-4.8.30-clang16.patch
)
src_prepare() {
diff --git a/sys-libs/db/db-5.3.28-r8.ebuild b/sys-libs/db/db-5.3.28-r9.ebuild
index 6b76da14de94..4918af5d46fe 100644
--- a/sys-libs/db/db-5.3.28-r8.ebuild
+++ b/sys-libs/db/db-5.3.28-r9.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -56,6 +56,7 @@ PATCHES=(
# Needed when compiling with clang
"${FILESDIR}"/${PN}-5.1.29-rename-atomic-compare-exchange.patch
+ "${FILESDIR}"/${PN}-5.3.28-clang16.patch
)
src_prepare() {
diff --git a/sys-libs/db/files/db-4.8.30-clang16.patch b/sys-libs/db/files/db-4.8.30-clang16.patch
new file mode 100644
index 000000000000..b28eb145e4a8
--- /dev/null
+++ b/sys-libs/db/files/db-4.8.30-clang16.patch
@@ -0,0 +1,281 @@
+https://bugs.gentoo.org/883413
+--- a/dist/aclocal/clock.m4
++++ b/dist/aclocal/clock.m4
+@@ -20,12 +20,14 @@ esac
+ # existence to mean the clock really exists.
+ AC_CACHE_CHECK([for clock_gettime monotonic clock], db_cv_clock_monotonic, [
+ AC_TRY_RUN([
++#include <time.h>
+ #include <sys/time.h>
+-main() {
++int main(void) {
+ struct timespec t;
+ return (clock_gettime(CLOCK_MONOTONIC, &t) != 0);
+ }], db_cv_clock_monotonic=yes, db_cv_clock_monotonic=no,
+ AC_TRY_LINK([
++#include <time.h>
+ #include <sys/time.h>], [
+ struct timespec t;
+ clock_gettime(CLOCK_MONOTONIC, &t);
+--- a/dist/aclocal/mutex.m4
++++ b/dist/aclocal/mutex.m4
+@@ -3,8 +3,9 @@
+ # POSIX pthreads tests: inter-process safe and intra-process only.
+ AC_DEFUN(AM_PTHREADS_SHARED, [
+ AC_TRY_RUN([
++#include <stdlib.h>
+ #include <pthread.h>
+-main() {
++int main(void) {
+ pthread_cond_t cond;
+ pthread_mutex_t mutex;
+ pthread_condattr_t condattr;
+@@ -24,6 +25,7 @@ main() {
+ pthread_mutexattr_destroy(&mutexattr));
+ }], [db_cv_mutex="$1"],,
+ AC_TRY_LINK([
++#include <stdlib.h>
+ #include <pthread.h>],[
+ pthread_cond_t cond;
+ pthread_mutex_t mutex;
+@@ -45,8 +47,9 @@ AC_TRY_LINK([
+ ], [db_cv_mutex="$1"]))])
+ AC_DEFUN(AM_PTHREADS_PRIVATE, [
+ AC_TRY_RUN([
++#include <stdlib.h>
+ #include <pthread.h>
+-main() {
++int main(void) {
+ pthread_cond_t cond;
+ pthread_mutex_t mutex;
+ pthread_condattr_t condattr;
+@@ -64,6 +67,7 @@ main() {
+ pthread_mutexattr_destroy(&mutexattr));
+ }], [db_cv_mutex="$1"],,
+ AC_TRY_LINK([
++#include <stdlib.h>
+ #include <pthread.h>],[
+ pthread_cond_t cond;
+ pthread_mutex_t mutex;
+@@ -158,6 +162,7 @@ if test "$db_cv_mutex" = no; then
+ # LWP threads: _lwp_XXX
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_LINK([
++ #include <stdlib.h>
+ #include <synch.h>],[
+ static lwp_mutex_t mi = SHAREDMUTEX;
+ static lwp_cond_t ci = SHAREDCV;
+@@ -174,6 +179,7 @@ if test "$db_cv_mutex" = no; then
+ LIBS="$LIBS -lthread"
+ AC_TRY_LINK([
+ #include <thread.h>
++ #include <stdlib.h>
+ #include <synch.h>],[
+ mutex_t mutex;
+ cond_t cond;
+@@ -189,6 +195,7 @@ if test "$db_cv_mutex" = no; then
+ if test "$db_cv_mutex" = no -o "$db_cv_mutex" = ui_only; then
+ AC_TRY_LINK([
+ #include <thread.h>
++ #include <stdlib.h>
+ #include <synch.h>],[
+ mutex_t mutex;
+ cond_t cond;
+@@ -213,7 +220,7 @@ if test "$db_cv_mutex" = no; then
+ # x86/gcc: FreeBSD, NetBSD, BSD/OS, Linux
+ AC_TRY_COMPILE(,[
+ #if (defined(i386) || defined(__i386__)) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -222,7 +229,7 @@ if test "$db_cv_mutex" = no; then
+ # x86_64/gcc: FreeBSD, NetBSD, BSD/OS, Linux
+ AC_TRY_COMPILE(,[
+ #if (defined(x86_64) || defined(__x86_64__)) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -245,7 +252,7 @@ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(__sparc__) && defined(__GNUC__)
+ asm volatile ("membar #StoreStore|#StoreLoad|#LoadStore");
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -287,7 +294,7 @@ AC_TRY_LINK([
+ msem_init(&x, 0);
+ msem_lock(&x, 0);
+ msem_unlock(&x, 0);
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -304,7 +311,7 @@ AC_TRY_LINK([
+ msem_init(&x, 0);
+ msem_lock(&x, 0);
+ msem_unlock(&x, 0);
+- exit(0);
++ return 0;
+ ], [db_cv_mutex=UNIX/msem_init])
+ fi
+
+@@ -326,7 +333,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(__USLC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -383,7 +390,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(__alpha) && defined(__DECC)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -394,7 +401,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(__alpha) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -405,7 +412,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(__arm__) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -416,7 +423,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if (defined(__mips) || defined(__mips__)) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -427,7 +434,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if (defined(__hppa) || defined(__hppa__)) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -438,7 +445,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if (defined(__powerpc__) || defined(__ppc__)) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -449,7 +456,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if (defined(mc68020) || defined(sun3)) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -460,7 +467,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(__MVS__) && defined(__IBMC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -471,7 +478,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(__s390__) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -482,7 +489,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(__ia64) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -493,7 +500,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(_UTS)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -814,9 +821,9 @@ fi
+ if test "$db_cv_atomic" = no; then
+ AC_TRY_COMPILE(,[
+ #if ((defined(i386) || defined(__i386__)) && defined(__GNUC__))
+- exit(0);
++ return 0;
+ #elif ((defined(x86_64) || defined(__x86_64__)) && defined(__GNUC__))
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -825,6 +832,7 @@ fi
+
+ if test "$db_cv_atomic" = no; then
+ AC_TRY_LINK([
++#include <stdlib.h>
+ #include <sys/atomic.h>],[
+ volatile unsigned val = 1;
+ exit (atomic_inc_uint_nv(&val) != 2 ||
+--- a/dist/aclocal/sequence.m4
++++ b/dist/aclocal/sequence.m4
+@@ -43,7 +43,9 @@ AC_DEFUN(AM_SEQUENCE_CONFIGURE, [
+ # test, which won't test for the appropriate printf format strings.
+ if test "$db_cv_build_sequence" = "yes"; then
+ AC_TRY_RUN([
+- main() {
++ #include <stdio.h>
++ #include <string.h>
++ int main(void) {
+ $db_cv_seq_type l;
+ unsigned $db_cv_seq_type u;
+ char buf@<:@100@:>@;
+@@ -59,7 +61,10 @@ AC_DEFUN(AM_SEQUENCE_CONFIGURE, [
+ return (1);
+ return (0);
+ }],, [db_cv_build_sequence="no"],
+- AC_TRY_LINK(,[
++ AC_TRY_LINK([
++ #include <stdio.h>
++ #include <string.h>
++ ],[
+ $db_cv_seq_type l;
+ unsigned $db_cv_seq_type u;
+ char buf@<:@100@:>@;
diff --git a/sys-libs/db/files/db-5.3.28-clang16.patch b/sys-libs/db/files/db-5.3.28-clang16.patch
new file mode 100644
index 000000000000..aab73d87a06b
--- /dev/null
+++ b/sys-libs/db/files/db-5.3.28-clang16.patch
@@ -0,0 +1,325 @@
+https://bugs.gentoo.org/883413
+--- a/dist/aclocal/clock.m4
++++ b/dist/aclocal/clock.m4
+@@ -20,12 +20,14 @@ esac
+ # existence to mean the clock really exists.
+ AC_CACHE_CHECK([for clock_gettime monotonic clock], db_cv_clock_monotonic, [
+ AC_TRY_RUN([
++#include <time.h>
+ #include <sys/time.h>
+-main() {
++int main(void) {
+ struct timespec t;
+ return (clock_gettime(CLOCK_MONOTONIC, &t) != 0);
+ }], db_cv_clock_monotonic=yes, db_cv_clock_monotonic=no,
+ AC_TRY_LINK([
++#include <time.h>
+ #include <sys/time.h>], [
+ struct timespec t;
+ clock_gettime(CLOCK_MONOTONIC, &t);
+--- a/dist/aclocal/mmap.m4
++++ b/dist/aclocal/mmap.m4
+@@ -29,6 +29,7 @@ if test "$mmap_ok" = "yes" ; then
+ * system to system.
+ */
+ #include <stdio.h>
++ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -42,13 +43,12 @@ if test "$mmap_ok" = "yes" ; then
+ #define MAP_FAILED (-1)
+ #endif
+
+- int catch_sig(sig)
+- int sig;
++ void catch_sig(int sig)
+ {
+ exit(1);
+ }
+
+- main() {
++ int main(void) {
+ const char *underlying;
+ unsigned gapsize;
+ char *base;
+--- a/dist/aclocal/mutex.m4
++++ b/dist/aclocal/mutex.m4
+@@ -5,7 +5,7 @@ AC_DEFUN(AM_PTHREADS_SHARED, [
+ AC_TRY_RUN([
+ #include <stdlib.h>
+ #include <pthread.h>
+-main() {
++int main(void) {
+ pthread_cond_t cond;
+ pthread_mutex_t mutex;
+ pthread_condattr_t condattr;
+@@ -49,7 +49,7 @@ AC_DEFUN(AM_PTHREADS_PRIVATE, [
+ AC_TRY_RUN([
+ #include <stdlib.h>
+ #include <pthread.h>
+-main() {
++int main(void) {
+ pthread_cond_t cond;
+ pthread_mutex_t mutex;
+ pthread_condattr_t condattr;
+@@ -89,7 +89,7 @@ AC_DEFUN(AM_PTHREADS_CONDVAR_DUPINITCHK, [
+ AC_TRY_RUN([
+ #include <stdlib.h>
+ #include <pthread.h>
+-main() {
++int main(void) {
+ pthread_cond_t cond;
+ pthread_condattr_t condattr;
+ exit(pthread_condattr_init(&condattr) ||
+@@ -110,7 +110,7 @@ AC_DEFUN(AM_PTHREADS_RWLOCKVAR_DUPINITCHK, [
+ AC_TRY_RUN([
+ #include <stdlib.h>
+ #include <pthread.h>
+-main() {
++int main(void) {
+ pthread_rwlock_t rwlock;
+ pthread_rwlockattr_t rwlockattr;
+ exit(pthread_rwlockattr_init(&rwlockattr) ||
+@@ -227,6 +227,7 @@ if test "$db_cv_mutex" = no; then
+ # LWP threads: _lwp_XXX
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_LINK([
++ #include <stdlib.h>
+ #include <synch.h>],[
+ static lwp_mutex_t mi = SHAREDMUTEX;
+ static lwp_cond_t ci = SHAREDCV;
+@@ -243,6 +244,7 @@ if test "$db_cv_mutex" = no; then
+ LIBS="$LIBS -lthread"
+ AC_TRY_LINK([
+ #include <thread.h>
++ #include <stdlib.h>
+ #include <synch.h>],[
+ mutex_t mutex;
+ cond_t cond;
+@@ -258,6 +260,7 @@ if test "$db_cv_mutex" = no; then
+ if test "$db_cv_mutex" = no -o "$db_cv_mutex" = ui_only; then
+ AC_TRY_LINK([
+ #include <thread.h>
++ #include <stdlib.h>
+ #include <synch.h>],[
+ mutex_t mutex;
+ cond_t cond;
+@@ -282,7 +285,7 @@ if test "$db_cv_mutex" = no; then
+ # x86/gcc: FreeBSD, NetBSD, BSD/OS, Linux
+ AC_TRY_COMPILE(,[
+ #if (defined(i386) || defined(__i386__)) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -291,7 +294,7 @@ if test "$db_cv_mutex" = no; then
+ # x86_64/gcc: FreeBSD, NetBSD, BSD/OS, Linux
+ AC_TRY_COMPILE(,[
+ #if (defined(x86_64) || defined(__x86_64__)) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -314,7 +317,7 @@ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(__sparc__) && defined(__GNUC__)
+ asm volatile ("membar #StoreStore|#StoreLoad|#LoadStore");
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -356,7 +359,7 @@ AC_TRY_LINK([
+ msem_init(&x, 0);
+ msem_lock(&x, 0);
+ msem_unlock(&x, 0);
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -373,7 +376,7 @@ AC_TRY_LINK([
+ msem_init(&x, 0);
+ msem_lock(&x, 0);
+ msem_unlock(&x, 0);
+- exit(0);
++ return 0;
+ ], [db_cv_mutex=UNIX/msem_init])
+ fi
+
+@@ -395,7 +398,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(__USLC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -452,7 +455,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(__alpha) && defined(__DECC)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -463,7 +466,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(__alpha) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -474,7 +477,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(__arm__) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -485,7 +488,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if (defined(__mips) || defined(__mips__)) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -496,7 +499,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if (defined(__hppa) || defined(__hppa__)) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -507,7 +510,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if (defined(__powerpc__) || defined(__ppc__)) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -518,7 +521,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if (defined(mc68020) || defined(sun3)) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -529,7 +532,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(__MVS__) && defined(__IBMC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -540,7 +543,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(__s390__) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -551,7 +554,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(__ia64) && defined(__GNUC__)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -562,7 +565,7 @@ fi
+ if test "$db_cv_mutex" = no; then
+ AC_TRY_COMPILE(,[
+ #if defined(_UTS)
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -910,9 +913,9 @@ fi
+ if test "$db_cv_atomic" = no; then
+ AC_TRY_COMPILE(,[
+ #if ((defined(i386) || defined(__i386__)) && defined(__GNUC__))
+- exit(0);
++ return 0;
+ #elif ((defined(x86_64) || defined(__x86_64__)) && defined(__GNUC__))
+- exit(0);
++ return 0;
+ #else
+ FAIL TO COMPILE/LINK
+ #endif
+@@ -921,6 +924,7 @@ fi
+
+ if test "$db_cv_atomic" = no; then
+ AC_TRY_LINK([
++#include <stdlib.h>
+ #include <sys/atomic.h>],[
+ volatile unsigned val = 1;
+ exit (atomic_inc_uint_nv(&val) != 2 ||
+--- a/dist/aclocal/sequence.m4
++++ b/dist/aclocal/sequence.m4
+@@ -43,7 +43,9 @@ AC_DEFUN(AM_SEQUENCE_CONFIGURE, [
+ # test, which won't test for the appropriate printf format strings.
+ if test "$db_cv_build_sequence" = "yes"; then
+ AC_TRY_RUN([
+- main() {
++ #include <stdio.h>
++ #include <string.h>
++ int main(void) {
+ $db_cv_seq_type l;
+ unsigned $db_cv_seq_type u;
+ char buf@<:@100@:>@;
+@@ -59,7 +61,10 @@ AC_DEFUN(AM_SEQUENCE_CONFIGURE, [
+ return (1);
+ return (0);
+ }],, [db_cv_build_sequence="no"],
+- AC_TRY_LINK(,[
++ AC_TRY_LINK([
++ #include <stdio.h>
++ #include <string.h>
++ ],[
+ $db_cv_seq_type l;
+ unsigned $db_cv_seq_type u;
+ char buf@<:@100@:>@;
+--- a/dist/aclocal/types.m4
++++ b/dist/aclocal/types.m4
+@@ -69,7 +69,7 @@ AC_SUBST(stdint_h_decl)
+ AC_MSG_CHECKING(for stdint.h)
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+ #include <stdint.h>
+- int main() {
++ int main(void) {
+ uint_least8_t x=0;
+ return x;
+ }])],[AC_MSG_RESULT(yes)
+@@ -77,7 +77,7 @@ if test "$db_cv_cxx" = "yes"; then
+ AC_MSG_CHECKING([if stdint.h can be used by C++])
+ AC_LANG_PUSH(C++)
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include <stdint.h>
+- int main() {
++ int main(void) {
+ uint_least8_t x=0;
+ return x;
+ }])],[AC_MSG_RESULT(yes)