svn commit: r308175 - head/mail/smtp-gated/files
Matthias Andree
mandree at FreeBSD.org
Mon Dec 3 21:15:25 UTC 2012
Author: mandree
Date: Mon Dec 3 21:15:24 2012
New Revision: 308175
URL: http://svnweb.freebsd.org/changeset/ports/308175
Log:
Fix build with clang, by:
- setting USE_CSTD=gnu89
- unnesting a nested function definition (patch-src__util.c)
Note that this code may be unsafe or yield bogus results where the sizes of
size_t/int or long/int do not match, such as amd64. This causes tons of
warnings with clang and should be reasonably easy to find.
Feature safe: yes
Added:
head/mail/smtp-gated/files/
head/mail/smtp-gated/files/patch-src__util.c (contents, props changed)
Added: head/mail/smtp-gated/files/patch-src__util.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/mail/smtp-gated/files/patch-src__util.c Mon Dec 3 21:15:24 2012 (r308175)
@@ -0,0 +1,23 @@
+--- ./src/util.c.orig 2012-12-03 22:11:37.000000000 +0100
++++ ./src/util.c 2012-12-03 22:11:44.000000000 +0100
+@@ -966,16 +966,16 @@
+ } /* set_rlimit() */
+ #endif
+
+-/* netmask(28) => 255.255.255.240 (network order) */
+-u_int32_t netmask(int m)
+-{
+- inline u_int32_t power(u_int32_t x, u_int32_t y)
++static inline u_int32_t power(u_int32_t x, u_int32_t y)
+ {
+ u_int32_t r = 1;
+ while (y--) r*=x;
+ return r;
+ }
+
++/* netmask(28) => 255.255.255.240 (network order) */
++u_int32_t netmask(int m)
++{
+ if (m < 0)
+ m = 0;
+
More information about the svn-ports-all
mailing list