pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/44193: [PATCH] graphics/sane-backends: epson2 missing socket.h include



>Number:         44193
>Category:       pkg
>Synopsis:       [PATCH] graphics/sane-backends: epson2 missing socket.h include
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 05 17:40:00 +0000 2010
>Originator:     Rumko
>Release:        /
>Organization:
>Environment:
DragonFly rumko.rumko.net 2.7-DEVELOPMENT DragonFly 
v2.7.3.81.ga3fa5-DEVELOPMENT #122: Wed Jun  2 09:23:28 CEST 2010     
root%rumko.rumko.net@localhost:/usr/obj/usr/src/sys/MYPRECIOUS  i386
>Description:
backend/epson2.c uses socket related functions and macros which are defined in 
<sys/socket.h> but does not include that header. Due to this the build dies 
with:
epson2.c: In function 'open_scanner':
epson2.c:459: warning: implicit declaration of function 'setsockopt'
epson2.c:459: error: 'SOL_SOCKET' undeclared (first use in this function)
epson2.c:459: error: (Each undeclared identifier is reported only once
epson2.c:459: error: for each function it appears in.)
epson2.c:459: error: 'SO_RCVTIMEO' undeclared (first use in this function)
gmake[2]: *** [libepson2_la-epson2.lo] Error 1
gmake[2]: Leaving directory 
`/usr/pkgsrc/graphics/sane-backends/work/sane-backends-1.0.21/backend'
>How-To-Repeat:

>Fix:
The patch is available at 
http://www.rumko.net/pkgsrc/0003-graphics-sane-backends-add-a-missing-sys-socket.h-in.patch
 and also inlined here:
From ac8d52488bf0d708796f391e2d64755d60ba383f Mon Sep 17 00:00:00 2001
From: Rumko <rumcic%gmail.com@localhost>
Date: Sun, 5 Dec 2010 11:52:29 +0100
Subject: [PATCH 3/3] graphics/sane-backends: add a missing sys/socket.h include

epson2 backend tries to use socket related functions and defines,
but it never included the proper headers to do it.
---
 graphics/sane-backends/distinfo         |    1 +
 graphics/sane-backends/patches/patch-af |   15 +++++++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)
 create mode 100644 graphics/sane-backends/patches/patch-af

diff --git a/graphics/sane-backends/distinfo b/graphics/sane-backends/distinfo
index d597c77..0fe3afb 100644
--- a/graphics/sane-backends/distinfo
+++ b/graphics/sane-backends/distinfo
@@ -8,4 +8,5 @@ SHA1 (patch-ab) = ab1f77b2f6e7cb691fe4e97aa6d0c8d8e4f46bc9
 SHA1 (patch-ac) = 900911de5cde4a6cdc35cbc2d13371b13c596474
 SHA1 (patch-ad) = ffd50b49305c05bda28de0536ca54171baff6892
 SHA1 (patch-ae) = bf9b53fd5c9b74915769afe9e17bed292a8a9ed9
+SHA1 (patch-af) = aa539c1561956537e63d1db81802a524dff1c715
 SHA1 (patch-ag) = 8155659bce4e1ce569a8a4a74131f21670c0a834
diff --git a/graphics/sane-backends/patches/patch-af 
b/graphics/sane-backends/patches/patch-af
new file mode 100644
index 0000000..eee7efe
--- /dev/null
+++ b/graphics/sane-backends/patches/patch-af
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- backend/epson2.h.orig      2010-04-05 15:18:04 +0200
++++ backend/epson2.h   2010-12-05 11:43:05 +0100
+@@ -36,6 +36,10 @@
+ #include <sys/types.h>
+ #endif
+
++#ifdef HAVE_SYS_SOCKET_H
++#include <sys/socket.h>
++#endif
++
+ #include <string.h> /* for memset and memcpy */
+ #include <stdio.h>
+
--
1.7.3.2



Home | Main Index | Thread Index | Old Index