Skip to content

Missing strnlen() on MingW #60

@gvanem

Description

@gvanem

MingW doesn't have strnlen() which is needed in sniffer.c + snifftest.c. To solve it, I added this to my config.h:

    extern __inline__ size_t strnlen (const char *str, size_t maxsize)
    {
      size_t n;
      for (n = 0; n < maxsize && *str; n++, str++)
        ;
      return (n);
    }

Maybe the missing functions (strnlen, strsep) could be added to a more suitable place?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions