Skip to Content.
Sympa Menu

freetds - [freetds] Build error on AIX 6/7 with freeTDS 1.00.6 (current stable)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Fabrice Manfroi <fm AT 4js.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: [freetds] Build error on AIX 6/7 with freeTDS 1.00.6 (current stable)
  • Date: Wed, 22 Jun 2016 16:12:44 +0200

Hello,

I'm trying to build the last stable freeTDS sources but it fails with
the following compilation errors:

tls.c:719: error: 'AF_INET6' undeclared (first use in this function)
tls.c:719: error: (Each undeclared identifier is reported only once
tls.c:719: error: for each function it appears in.)
tls.c:722: error: 'AF_INET' undeclared (first use in this function)

It seems that an include of the sys/socket.h header is missing.

I propose the attached patch to fix the problem.

Best Regards.

From 69495a901df8ac99b1c0dfe9688c0e4a6593dd3f Mon Sep 17 00:00:00 2001
From: Manfroi Fabrice <fm AT 4js.com>
Date: Wed, 22 Jun 2016 16:06:20 +0200
Subject: [PATCH] Fix build error on AIX 6.1 / 7.1 / 7.2 :

tls.c:719: error: 'AF_INET6' undeclared (first use in this function)
tls.c:719: error: (Each undeclared identifier is reported only once
tls.c:719: error: for each function it appears in.)
tls.c:722: error: 'AF_INET' undeclared (first use in this function)
---
 include/freetds/tds.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/freetds/tds.h b/include/freetds/tds.h
index 685c75b..8541314 100644
--- a/include/freetds/tds.h
+++ b/include/freetds/tds.h
@@ -25,6 +25,10 @@
 #include <stdio.h>
 #include <time.h>
 
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
 #ifdef HAVE_STDDEF_H
 #include <stddef.h>
 #endif
-- 
2.1.4

Attachment: signature.asc
Description: OpenPGP digital signature




Archive powered by MHonArc 2.6.24.

Top of Page