ensure that close() as well as get_sock() are properly defined at compile time.

This issue surfaced on Solaris with the Sunpro compiler.
This commit is contained in:
Georg Schwarz 2010-06-19 22:52:24 +00:00 committed by Thomas Klausner
parent 7694a6edc0
commit f55124921b
3 changed files with 21 additions and 11 deletions

View File

@ -1,7 +1,7 @@
$NetBSD: distinfo,v 1.3 2009/11/22 10:26:10 gschwarz Exp $
$NetBSD: distinfo,v 1.4 2010/06/19 22:52:24 gschwarz Exp $
SHA1 (ar7-0.1.tar.gz) = 76c2373f5890e7a511ac78c90c05f03ff60a644d
RMD160 (ar7-0.1.tar.gz) = 482696b197fdbefd6cad69a8f4ed50025c2c2258
Size (ar7-0.1.tar.gz) = 79230 bytes
SHA1 (patch-aa) = 8601b28856197e172423cd02db32171ed9b46ff6
SHA1 (patch-ab) = 04484effa7edfaa6081eb840d4eac87ea7ab2f85
SHA1 (patch-aa) = 4886219149eca3fe67b4f76f8be24d51b3adace5
SHA1 (patch-ab) = 55757452a59a3584f7617c5874548a369bb32ea6

View File

@ -1,10 +1,16 @@
$NetBSD: patch-aa,v 1.1 2008/11/08 21:31:18 gschwarz Exp $
$NetBSD: patch-aa,v 1.2 2010/06/19 22:52:24 gschwarz Exp $
--- src/net.h.orig Sat Nov 8 23:02:14 2008
+++ src/net.h Sat Nov 8 23:02:43 2008
@@ -1,4 +1,5 @@
--- src/net.h.orig 2006-05-20 19:53:42.000000000 +0200
+++ src/net.h 2010-06-20 00:23:07.000000000 +0200
@@ -1,7 +1,11 @@
#if !defined(__WIN32__)
+ #include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
#else
#include <winsock2.h>
#endif

View File

@ -1,8 +1,8 @@
$NetBSD: patch-ab,v 1.1 2009/11/22 10:26:10 gschwarz Exp $
$NetBSD: patch-ab,v 1.2 2010/06/19 22:52:24 gschwarz Exp $
--- src/logic.c.orig 2009-11-08 10:49:06.920001000 +0100
+++ src/logic.c 2009-11-08 10:51:26.039999000 +0100
@@ -2,7 +2,13 @@
--- src/logic.c.orig 2006-05-24 14:05:53.000000000 +0200
+++ src/logic.c 2010-06-20 00:36:47.000000000 +0200
@@ -2,9 +2,17 @@
#include "err.h"
#include <stdio.h>
#include <string.h>
@ -15,4 +15,8 @@ $NetBSD: patch-ab,v 1.1 2009/11/22 10:26:10 gschwarz Exp $
+#endif
#include "defaults.h"
+#include "net.h" /* needed for get_sock() */
+
int ar7_login(int fd, const char *user, const char *pass)
{