Hi Ross,

On Fri, Nov 12, 2010 at 01:21:11PM -0500, Ross West wrote:
> Hi Willy,
> 
> I got a compile error on Freebsd while doing up the new port for
> 1.5.dev3
> 
> This machine is running Freebsd-8.1 Release, amd64 arch.
> 
> -= start
> ... much successful compile output clipped...
> gcc -Iinclude -Iebtree -Wall  -O2 -g   -DFREEBSD_PORTS    -DTPROXY 
> -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_KQUEUE -DUSE_PCRE 
> -I/usr/local/include  -DCONFIG_HAPROXY_VERSION=\"1.5-dev3\" 
> -DCONFIG_HAPROXY_DATE=\"2010/11/11\" -c -o src/signal.o src/signal.c
> gcc -Iinclude -Iebtree -Wall  -O2 -g   -DFREEBSD_PORTS    -DTPROXY 
> -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_KQUEUE -DUSE_PCRE 
> -I/usr/local/include  -DCONFIG_HAPROXY_VERSION=\"1.5-dev3\" 
> -DCONFIG_HAPROXY_DATE=\"2010/11/11\" -c -o src/acl.o src/acl.c
> gcc -Iinclude -Iebtree -Wall  -O2 -g   -DFREEBSD_PORTS    -DTPROXY 
> -DCONFIG_HAP_CRYPT -DENABLE_POLL -DENABLE_KQUEUE -DUSE_PCRE 
> -I/usr/local/include  -DCONFIG_HAPROXY_VERSION=\"1.5-dev3\" 
> -DCONFIG_HAPROXY_DATE=\"2010/11/11\" -c -o src/pattern.o src/pattern.c
> In file included from include/proto/pattern.h:25,
>                  from src/pattern.c:16:
> include/types/pattern.h:57: error: expected specifier-qualifier-list before 
> 'int32_t'

I see, it's probably just a matter of including <stdint.h>. However, this one
is not present on all machines. It's interesting to note that the uint32_t at
the line just before did not cause any trouble. Since those types are rarely
used in haproxy, I'd rather replace "uint32_t" with "unsigned int" and "int32_t"
with "int".

Could you please try with this minuscule non-invasive patch ? If it works, I'll
merge it as-is for now.

Thanks!
Willy

diff --git a/include/types/pattern.h b/include/types/pattern.h
index 78614bc..a3d5c36 100644
--- a/include/types/pattern.h
+++ b/include/types/pattern.h
@@ -54,7 +54,7 @@ enum {
 union pattern_arg_data {
        struct in_addr ip;        /* used for ipv4 type */
        uint32_t integer;         /* used for unsigned 32bits integer type */
-       int32_t sinteger;         /* used for signed 32bits integer type */
+       int sinteger;             /* used for signed 32bits integer type */
        struct chunk str;
 };
 


Reply via email to