[RFC PATCH 9/9] test: smtp-dummy: fixes for -std=c99 -pedantic

Subject: [RFC PATCH 9/9] test: smtp-dummy: fixes for -std=c99 -pedantic

Date: Sun, 8 Jan 2012 01:26:23 +0200

To: notmuch@notmuchmail.org

Cc:

From: Jani Nikula


Signed-off-by: Jani Nikula <jani@nikula.org>
---
 test/smtp-dummy.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/test/smtp-dummy.c b/test/smtp-dummy.c
index 3801a5e..1c29a7d 100644
--- a/test/smtp-dummy.c
+++ b/test/smtp-dummy.c
@@ -33,6 +33,8 @@
  * have been warned.
  */
 
+#define _POSIX_C_SOURCE 200809L /* for getline() and fdopen() */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -162,7 +164,7 @@ main (int argc, char *argv[])
 	memset (&addr, 0, sizeof (addr));
 	addr.sin_family = AF_INET;
 	addr.sin_port = htons (25025);
-	addr.sin_addr = *(struct in_addr *) hostinfo->h_addr;
+	addr.sin_addr = *(struct in_addr *) hostinfo->h_addr_list[0];
 	err = bind (sock, (struct sockaddr *) &addr, sizeof(addr));
 	if (err) {
 		fprintf (stderr, "Error: bind() failed: %s\n",
-- 
1.7.5.4


Thread: