[Snort-devel] [PATCH] daq: fix build against the musl C library

Sergio Prado sergio.prado at e-labworks.com
Wed Apr 4 20:58:04 EDT 2018


Hello Joel,

It is against DAQ version 2.0.6.

Best regards,

Sergio Prado
Embedded Labworks
Office: +55 11 2628-3461
Mobile: +55 11 97123-3420

2018-04-03 1:31 GMT-03:00 Joel Esler (jesler) <jesler at cisco.com>:

> To confirm, what version of DAQ is this against?
>
>
> On Apr 2, 2018, at 10:00 AM, Sergio Prado <sergio.prado at e-labworks.com>
> wrote:
>
> Hello,
>
> Anyone had the time to review this patch?
>
> We have already integrated daq in the Buildroot buildsystem [1] with an
> out-of-tree patch, but it would be good to have this patch upstream.
>
> [1] https://git.buildroot.net/buildroot/commit/?id=
> 2f7382b6f6c2fcb0f0a26ec1cf19df9128257cc3
>
> Thanks,
>
> Sergio Prado
> Embedded Labworks
> Office: +55 11 2628-3461
> Mobile: +55 11 97123-3420
>
> 2018-01-13 8:28 GMT-02:00 Sergio Prado <sergio.prado at e-labworks.com>:
>
>> musl C library doesn't have any <sys/unistd.h>. Even on glibc,
>> <sys/unistd.h> is just doing #include <unistd.h>. So let's just
>> include <unistd.h>, and we can build daq against most common C
>> libraries (glibc, musl, uclibc-ng).
>>
>> Signed-off-by: Sergio Prado <sergio.prado at e-labworks.com>
>> ---
>>  os-daq-modules/daq_ipfw.c | 2 +-
>>  os-daq-modules/daq_ipq.c  | 2 +-
>>  os-daq-modules/daq_nfq.c  | 2 +-
>>  3 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/os-daq-modules/daq_ipfw.c b/os-daq-modules/daq_ipfw.c
>> index 016beb06ad61..c2a41759bb04 100644
>> --- a/os-daq-modules/daq_ipfw.c
>> +++ b/os-daq-modules/daq_ipfw.c
>> @@ -23,10 +23,10 @@
>>  #include <stdlib.h>
>>  #include <string.h>
>>  #include <stdio.h>
>> +#include <unistd.h>
>>
>>  #include <sys/types.h>
>>  #include <sys/time.h>
>> -#include <sys/unistd.h>
>>
>>  #include <netinet/in.h>
>>  #include <sys/socket.h>
>> diff --git a/os-daq-modules/daq_ipq.c b/os-daq-modules/daq_ipq.c
>> index 77ec6e9505e5..8a4a109df3d4 100644
>> --- a/os-daq-modules/daq_ipq.c
>> +++ b/os-daq-modules/daq_ipq.c
>> @@ -24,10 +24,10 @@
>>  #include <stdio.h>
>>  #include <stdlib.h>
>>  #include <string.h>
>> +#include <unistd.h>
>>
>>  #include <sys/types.h>
>>  #include <sys/time.h>
>> -#include <sys/unistd.h>
>>
>>  #include <netinet/ip.h>
>>
>> diff --git a/os-daq-modules/daq_nfq.c b/os-daq-modules/daq_nfq.c
>> index 33021c0ec991..4de94b6a0271 100644
>> --- a/os-daq-modules/daq_nfq.c
>> +++ b/os-daq-modules/daq_nfq.c
>> @@ -24,10 +24,10 @@
>>  #include <stdio.h>
>>  #include <stdlib.h>
>>  #include <string.h>
>> +#include <unistd.h>
>>
>>  #include <sys/types.h>
>>  #include <sys/time.h>
>> -#include <sys/unistd.h>
>>
>>  #include <netinet/ip.h>
>>
>> --
>> 1.9.1
>>
>>
> _______________________________________________
> Snort-devel mailing list
> Snort-devel at lists.snort.org
> https://lists.snort.org/mailman/listinfo/snort-devel
>
> Please visit http://blog.snort.org for the latest news about Snort!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.snort.org/pipermail/snort-devel/attachments/20180404/040d7745/attachment.html>


More information about the Snort-devel mailing list