Ticket #44227: patch-src-suricata-common.h.diff

File patch-src-suricata-common.h.diff, 895 bytes (added by Schamschula (Marius Schamschula), 10 years ago)
  • src/suricata-common.h

    old new  
    323323#include "util-path.h"
    324324#include "util-conf.h"
    325325
    326 size_t strlcat(char *, const char *src, size_t siz);
     326/*
     327* On OS X (and probably some other systems aswell), strlcat and strlcpy might be
     328* implemented as a macro. If this macro is defined while we're including this
     329* header, strlcat and strlcpy are already declared and trying to re-declare it with the 
     330* following line *will* fail, because the macro will expand to something
     331* that's not a valid function name.
     332*/
     333#ifndef strlcat
     334size_t (char *, const char *src, size_t siz);
     335#endif /* !defined(strlcat) */
     336#ifndef strlcpy
    327337size_t strlcpy(char *dst, const char *src, size_t siz);
     338#endif /* !defined(strlcpy) */
    328339
    329340extern int coverage_unittests;
    330341extern int g_ut_modules;