Project

General

Profile

Actions

Bug #963

closed

XFF compile failure on OSX

Added by Victor Julien about 11 years ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

gcc -DHAVE_CONFIG_H -I. -I..   -I./../libhtp/  -I/opt/local/include -DLOCAL_STATE_DIR=\"/usr/local/var\" -g -O2 -Wextra -Werror-implicit-function-declaration -fno-tree-pre -Wall -fno-strict-aliasing -Wno-unused-parameter -std=gnu99 -DOS_DARWIN -DHAVE_LIBNET11 -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD -DHAVE_NET_ETHERNET_H -DHAVE_LIBNET_ICMPV6_UNREACH  -I/opt/local/include -DLIBPCAP_VERSION_MAJOR=1 -DHAVE_PCAP_SET_BUFF -DREVISION="8539791" -MT alert-unified2-alert.o -MD -MP -MF .deps/alert-unified2-alert.Tpo -c -o alert-unified2-alert.o alert-unified2-alert.c
alert-unified2-alert.c: In function 'GetXFFIP':
alert-unified2-alert.c:357: error: implicit declaration of function 'memrchr'
alert-unified2-alert.c:357: warning: initialization makes pointer from integer without a cast
make[3]: *** [alert-unified2-alert.o] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Actions #1

Updated by Victor Julien about 11 years ago

I guess the problem is that memrchr is a GNU extension:

The memchr() function conforms to SVr4, 4.3BSD, C89, C99, POSIX.1-2001.

The memrchr() function is a GNU extension, available since glibc 2.1.91.

The rawmemchr() function is a GNU extension, available since glibc 2.1.

Actions #2

Updated by Victor Julien about 11 years ago

Actions #3

Updated by Victor Julien about 11 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

Fixed by:

commit c8b71938ff64b58fb64bb30a7c7df452609bc2b2
Author: Victor Julien <victor@mini.local>
Date:   Fri Sep 20 17:12:58 2013 +0200

    Add a fallback memrchr implementation for those platforms that dont support it. Bug #963.

Confirmation:
https://buildbot.suricata-ids.org/builders/macosxi/builds/26

Actions

Also available in: Atom PDF