You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2023/01/11 09:44:46 UTC
svn commit: r1906595 - in /apr/apr/branches/1.7.x: ./ CHANGES build/ build/apr_network.m4 configure.in poll/os2/pollset.c poll/unix/pollset.c
Author: jorton
Date: Wed Jan 11 09:44:46 2023
New Revision: 1906595
URL: http://svn.apache.org/viewvc?rev=1906595&view=rev
Log:
Merge r1906594 from trunk:
Fix further strict C99 compliance issue. (fixes #37)
PR: 66408
Submitted by: Sam James <sam gentoo.org>
Modified:
apr/apr/branches/1.7.x/ (props changed)
apr/apr/branches/1.7.x/CHANGES
apr/apr/branches/1.7.x/build/ (props changed)
apr/apr/branches/1.7.x/build/apr_network.m4
apr/apr/branches/1.7.x/configure.in
apr/apr/branches/1.7.x/poll/os2/pollset.c
apr/apr/branches/1.7.x/poll/unix/pollset.c
Propchange: apr/apr/branches/1.7.x/
------------------------------------------------------------------------------
Merged /apr/apr/trunk:r1906594
Modified: apr/apr/branches/1.7.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.7.x/CHANGES?rev=1906595&r1=1906594&r2=1906595&view=diff
==============================================================================
--- apr/apr/branches/1.7.x/CHANGES [utf-8] (original)
+++ apr/apr/branches/1.7.x/CHANGES [utf-8] Wed Jan 11 09:44:46 2023
@@ -6,8 +6,9 @@ Changes for APR 1.7.1
(This issue was addressed as CVE-2017-12613 in APR 1.6.3 and
later 1.6.x releases, but was missing in 1.7.0.) [Stefan Sperling]
- *) configure: Fix configure for compilers which don't accept implicit
- "int". PR 66396. [Florian Weimer <fweimer redhat.com>]
+ *) configure: Fix various build issues for compilers enforcing
+ strict C99 compliance. PR 66396, 66408.
+ [Florian Weimer <fweimer redhat.com>, Sam James <sam gentoo.org>]
*) apr_atomic_read64(): Fix non-atomic read on 32-bit Windows [Ivan Zhakov]
Propchange: apr/apr/branches/1.7.x/build/
------------------------------------------------------------------------------
Merged /apr/apr/trunk/build:r1906594
Modified: apr/apr/branches/1.7.x/build/apr_network.m4
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.7.x/build/apr_network.m4?rev=1906595&r1=1906594&r2=1906595&view=diff
==============================================================================
--- apr/apr/branches/1.7.x/build/apr_network.m4 (original)
+++ apr/apr/branches/1.7.x/build/apr_network.m4 Wed Jan 11 09:44:46 2023
@@ -66,6 +66,12 @@ AC_DEFUN([APR_CHECK_WORKING_GETADDRINFO]
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
int main(void) {
struct addrinfo hints, *ai;
@@ -400,9 +406,11 @@ AC_DEFUN([APR_CHECK_TCP_NODELAY_INHERITE
AC_CACHE_CHECK(if TCP_NODELAY setting is inherited from listening sockets, ac_cv_tcp_nodelay_inherited,[
AC_TRY_RUN( [
#include <stdio.h>
+#include <stdlib.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
+#include <string.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -752,6 +760,12 @@ AC_TRY_COMPILE([
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
],[
inet_addr("127.0.0.1");
],[
@@ -772,6 +786,10 @@ fi
AC_DEFUN([APR_CHECK_INET_NETWORK], [
AC_CACHE_CHECK(for inet_network, ac_cv_func_inet_network,[
AC_TRY_COMPILE([
+#include <sys/socket.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -958,7 +976,9 @@ AC_DEFUN([APR_CHECK_MCAST], [
AC_CACHE_CHECK([for struct ip_mreq], [apr_cv_struct_ipmreq], [
AC_TRY_COMPILE([
#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
], [
struct ip_mreq mip;
mip.imr_interface.s_addr = INADDR_ANY;
Modified: apr/apr/branches/1.7.x/configure.in
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.7.x/configure.in?rev=1906595&r1=1906594&r2=1906595&view=diff
==============================================================================
--- apr/apr/branches/1.7.x/configure.in (original)
+++ apr/apr/branches/1.7.x/configure.in Wed Jan 11 09:44:46 2023
@@ -1562,8 +1562,6 @@ AC_CHECK_FUNCS(sigaction, [ have_sigacti
AC_DECL_SYS_SIGLIST
AC_CHECK_FUNCS(fork, [ fork="1" ], [ fork="0" ])
-APR_CHECK_INET_ADDR
-APR_CHECK_INET_NETWORK
AC_SUBST(apr_inaddr_none)
AC_CHECK_FUNC(_getch)
AC_CHECK_FUNCS(strerror_r, [ strerror_r="1" ], [ strerror_r="0" ])
@@ -1669,6 +1667,9 @@ APR_FLAG_HEADERS(
sys/un.h \
sys/wait.h)
+APR_CHECK_INET_ADDR
+APR_CHECK_INET_NETWORK
+
# IRIX 6.5 has a problem in <netinet/tcp.h> which prevents it from
# being included by itself. Check for <netinet/tcp.h> manually,
# including another header file first.
@@ -2371,7 +2372,7 @@ AC_TRY_RUN([
#ifndef SEM_FAILED
#define SEM_FAILED (-1)
#endif
-main()
+int main()
{
sem_t *psem;
const char *sem_name = "/apr_autoconf";
@@ -2568,6 +2569,8 @@ int fd;
struct flock proc_mutex_lock_it = {0};
const char *fname = "conftest.fcntl";
+int lockit();
+
int main()
{
int rc, status;;
Modified: apr/apr/branches/1.7.x/poll/os2/pollset.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.7.x/poll/os2/pollset.c?rev=1906595&r1=1906594&r2=1906595&view=diff
==============================================================================
--- apr/apr/branches/1.7.x/poll/os2/pollset.c (original)
+++ apr/apr/branches/1.7.x/poll/os2/pollset.c Wed Jan 11 09:44:46 2023
@@ -308,7 +308,7 @@ APR_DECLARE(apr_status_t) apr_pollset_wa
-APR_DECLARE(const char *) apr_poll_method_defname()
+APR_DECLARE(const char *) apr_poll_method_defname(void)
{
return "select";
}
Modified: apr/apr/branches/1.7.x/poll/unix/pollset.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.7.x/poll/unix/pollset.c?rev=1906595&r1=1906594&r2=1906595&view=diff
==============================================================================
--- apr/apr/branches/1.7.x/poll/unix/pollset.c (original)
+++ apr/apr/branches/1.7.x/poll/unix/pollset.c Wed Jan 11 09:44:46 2023
@@ -188,7 +188,7 @@ APR_DECLARE(const char *) apr_pollset_me
return pollset->provider->name;
}
-APR_DECLARE(const char *) apr_poll_method_defname()
+APR_DECLARE(const char *) apr_poll_method_defname(void)
{
const apr_pollset_provider_t *provider = NULL;