Re: [dev] simple portscanner

From: anonymous <aim0shei_AT_lavabit.com>
Date: Sat, 2 Jan 2010 19:53:55 +0300

> Here is a patch to let it build on OpenBSD:
>
> --- parse.c.orig Sat Jan 2 12:54:18 2010
> +++ parse.c Sat Jan 2 12:54:01 2010
> @@ -1,3 +1,5 @@
> +#include <sys/types.h>
> +#include <sys/socket.h>
> #include <netinet/in.h>
>
> #include <sys/queue.h>
> @@ -5,6 +7,7 @@
> #include <ctype.h>
> #include <err.h>
> #include <errno.h>
> +#include <pthread.h>
> #include <stdbool.h>
> #include <stdlib.h>
> #include <string.h>
>

Why you include <pthread.h> in parse.c? It doesn't use any pthread function.

Any way, I try to follow OpenBSD style(9) aka KNF so <sys/queue.h>
should be placed before network includes, it was a mistake.
Received on Sat Jan 02 2010 - 16:53:55 UTC

This archive was generated by hypermail 2.2.0 : Sat Jan 02 2010 - 17:00:04 UTC