[PATCH 03/10] Fix compilation of smtp-dummy on FreeBSD

Jani Nikula jani at nikula.org
Sat May 26 02:52:02 PDT 2012


On May 25, 2012 4:44 PM, "Mike Kelly" <pioto at pioto.org> wrote:
>
> ---
>  test/smtp-dummy.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/test/smtp-dummy.c b/test/smtp-dummy.c
> index 3801a5e..aa82fa1 100644
> --- a/test/smtp-dummy.c
> +++ b/test/smtp-dummy.c
> @@ -33,11 +33,14 @@
>  * have been warned.
>  */
>
> +#define _GNU_SOURCE /* for getline */

First of all, thanks for sharing your work.

Independent of this patch, I've been thinking about defining _GNU_SOURCE in
the makefile. I don't think it's very elegant to #define it everywhere. It
would also pave the way towards building with -pedantic (and possibly
-std=c99) in a portable way. For example, the compat test code #defines
_GNU_SOURCE while the actual code does not, which I think is an error.

I'll look into this after the weekend (unless you beat me to it).

BR,
Jani.

>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
>  #include <errno.h>
> -#include <netinet/ip.h>
> +#include <sys/types.h>
> +#include <sys/socket.h>
> +#include <netinet/in.h>
>  #include <netdb.h>
>  #include <unistd.h>
>
> --
> 1.7.10.2
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120526/2226a245/attachment.html>


More information about the notmuch mailing list