pkgsrc-Bugs archive

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

pkg/48467: math/glpk conflicts with open(2), write(2), etc.



>Number:         48467
>Category:       pkg
>Synopsis:       math/glpk conflicts with open(2), write(2), etc.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 21 22:05:00 +0000 2013
>Originator:     Leonardo Taccari
>Release:        NetBSD 6.1.2
>Organization:
>Environment:
System: NetBSD :) 6.1.2 NetBSD 6.1.2 (EEEPC900) #0: Mon Sep 30 15:26:39 CEST 
2013 leot@:):/usr/src/sys/arch/i386/compile/EEEPC900 i386
Architecture: i386
Machine: i386
>Description:
        math/glpk does not build due various conflicts as reported by
        recent pkgsrc bulk builds.
        For a reference please give a look to:

         
http://nyftp.netbsd.org/pub/pkgsrc/packages/reports/2013Q3/NetBSD-6.0-i386/20131220.1121/glpk-4.52.1/build.log

>How-To-Repeat:
        $ cd pkgsrc/math/glpk
        $ make
>Fix:
        Please apply the following patches.

        Thank you in advance!


----------------------8<-------------8<-------------8<----------------------
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/math/glpk/distinfo,v
retrieving revision 1.31
diff -u -r1.31 distinfo
--- distinfo    31 Jul 2013 07:02:35 -0000      1.31
+++ distinfo    21 Dec 2013 21:58:20 -0000
@@ -3,3 +3,6 @@
 SHA1 (glpk-4.52.1.tar.gz) = 63fd6788f95adb52789767b19e38cfb58dda331e
 RMD160 (glpk-4.52.1.tar.gz) = 075727b0be569e96d3bc29d248334132a80f4e25
 Size (glpk-4.52.1.tar.gz) = 2812957 bytes
+SHA1 (patch-src_zlib_zio.c) = addb54ee573ddf27633fdc236c55dedd0004d401
+SHA1 (patch-src_zlib_zio.h) = 9ff71b69c9f9c04bdfac76d5821fa4bac8df530c
+SHA1 (patch-src_zlib_zsymb.h) = 39fa6c71af5416114bba899919720822ee59549e
Index: patches/patch-src_zlib_zio.c
===================================================================
RCS file: patches/patch-src_zlib_zio.c
diff -N patches/patch-src_zlib_zio.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_zlib_zio.c        21 Dec 2013 21:58:20 -0000
@@ -0,0 +1,51 @@
+$NetBSD$
+
+Avoid conflicts with open(2), read(2), write(2), lseek(2) and close(2).
+
+--- src/zlib/zio.c.orig        2013-07-28 08:00:00.000000000 +0000
++++ src/zlib/zio.c
+@@ -10,7 +10,7 @@
+ 
+ static FILE *file[FOPEN_MAX];
+ 
+-int open(const char *path, int oflag, ...)
++int zio_open(const char *path, int oflag, ...)
+ {     FILE *f;
+       int fd;
+       /* see file gzlib.c, function gz_open */
+@@ -31,7 +31,7 @@ int open(const char *path, int oflag, ..
+       return fd;
+ }
+ 
+-long read(int fd, void *buf, unsigned long cnt)
++long zio_read(int fd, void *buf, unsigned long cnt)
+ {     FILE *f;
+       assert(3 <= fd && fd < FOPEN_MAX);
+       f = file[fd];
+@@ -42,7 +42,7 @@ long read(int fd, void *buf, unsigned lo
+       return cnt;
+ }
+ 
+-long write(int fd, const void *buf, unsigned long cnt)
++long zio_write(int fd, const void *buf, unsigned long cnt)
+ {     FILE *f;
+       assert(3 <= fd && fd < FOPEN_MAX);
+       f = file[fd];
+@@ -55,7 +55,7 @@ long write(int fd, const void *buf, unsi
+       return cnt;
+ }
+ 
+-long lseek(int fd, long offset, int whence)
++long zio_lseek(int fd, long offset, int whence)
+ {     FILE *f;
+       assert(3 <= fd && fd < FOPEN_MAX);
+       f = file[fd];
+@@ -65,7 +65,7 @@ long lseek(int fd, long offset, int when
+       return ftell(f);
+ }
+ 
+-int close(int fd)
++int zio_close(int fd)
+ {     FILE *f;
+       assert(3 <= fd && fd < FOPEN_MAX);
+       f = file[fd];
Index: patches/patch-src_zlib_zio.h
===================================================================
RCS file: patches/patch-src_zlib_zio.h
diff -N patches/patch-src_zlib_zio.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_zlib_zio.h        21 Dec 2013 21:58:20 -0000
@@ -0,0 +1,23 @@
+$NetBSD$
+
+Avoid conflicts with open(2), read(2), write(2), lseek(2) and close(2).
+
+--- src/zlib/zio.h.orig        2013-07-28 08:00:00.000000000 +0000
++++ src/zlib/zio.h
+@@ -15,11 +15,11 @@
+ #define O_TRUNC  0x20
+ #define O_APPEND 0x40
+ 
+-int open(const char *path, int oflag, ...);
+-long read(int fd, void *buf, unsigned long cnt);
+-long write(int fd, const void *buf, unsigned long cnt);
+-long lseek(int fd, long offset, int whence);
+-int close(int fd);
++int zio_open(const char *path, int oflag, ...);
++long zio_read(int fd, void *buf, unsigned long cnt);
++long zio_write(int fd, const void *buf, unsigned long cnt);
++long zio_lseek(int fd, long offset, int whence);
++int zio_close(int fd);
+ 
+ #endif
+ 
Index: patches/patch-src_zlib_zsymb.h
===================================================================
RCS file: patches/patch-src_zlib_zsymb.h
diff -N patches/patch-src_zlib_zsymb.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_zlib_zsymb.h      21 Dec 2013 21:58:20 -0000
@@ -0,0 +1,23 @@
+$NetBSD$
+
+Avoid conflicts with open(2), read(2), write(2), lseek(2) and close(2).
+
+--- src/zlib/zsymb.h.orig      2013-07-28 08:00:00.000000000 +0000
++++ src/zlib/zsymb.h
+@@ -115,11 +115,11 @@
+ #define uncompress            zlib_uncompress
+ 
+ /* (zio.c) */
+-#define open                  zlib_open
+-#define read                  zlib_read
+-#define write                 zlib_write
+-#define lseek                 zlib_lseek
+-#define close                 zlib_close
++#define zio_open                  zlib_open
++#define zio_read                  zlib_read
++#define zio_write                 zlib_write
++#define zio_lseek                 zlib_lseek
++#define zio_close                 zlib_close
+ 
+ /* (zutil.c) */
+ #define z_errmsg              zlib_z_errmsg



Home | Main Index | Thread Index | Old Index