You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by ro...@apache.org on 2005/11/23 05:03:21 UTC

svn commit: r348360 - in /apr/apr/branches/0.9.x: CHANGES network_io/unix/sendrecv.c

Author: rooneg
Date: Tue Nov 22 20:02:34 2005
New Revision: 348360

URL: http://svn.apache.org/viewcvs?rev=348360&view=rev
Log:
Fix a warning when building on FreeBSD due to an error in the arguments
passed to sysctlbyname.  The fifth argument is a size_t, not a pointer,
so using NULL is incorrect.

This change is being committed directly to the 0.9.x branch because the
version of this code in trunk no longer uses sysctlbyname.

* network_io/unix/sendrecv.c
  (include_hdrs_in_length): Correct 5 argument to sysctlbyname.

* CHANGES: Note change.

Modified:
    apr/apr/branches/0.9.x/CHANGES
    apr/apr/branches/0.9.x/network_io/unix/sendrecv.c

Modified: apr/apr/branches/0.9.x/CHANGES
URL: http://svn.apache.org/viewcvs/apr/apr/branches/0.9.x/CHANGES?rev=348360&r1=348359&r2=348360&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/CHANGES (original)
+++ apr/apr/branches/0.9.x/CHANGES Tue Nov 22 20:02:34 2005
@@ -1,6 +1,7 @@
 Changes with APR 0.9.8-dev
 
-
+  *) Fix warning when compiling on FreeBSD by correcting the type of
+     the final argument passed to sysctlbyname. [Garrett Rooney]
 
 Changes with APR 0.9.7
 

Modified: apr/apr/branches/0.9.x/network_io/unix/sendrecv.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/0.9.x/network_io/unix/sendrecv.c?rev=348360&r1=348359&r2=348360&view=diff
==============================================================================
--- apr/apr/branches/0.9.x/network_io/unix/sendrecv.c (original)
+++ apr/apr/branches/0.9.x/network_io/unix/sendrecv.c Tue Nov 22 20:02:34 2005
@@ -406,7 +406,7 @@
     kernel_version = 0;    /* silence compiler warning */
     kernel_version_size = sizeof(kernel_version);
     if (sysctlbyname("kern.osreldate", &kernel_version, 
-                     &kernel_version_size, NULL, NULL) == 0 &&
+                     &kernel_version_size, NULL, 0) == 0 &&
         kernel_version < KERNEL_WITH_SENDFILE_LENGTH_FIX) {
         api = OLD;
         return 1;