[syslog-ng] Error compiling syslog-ng-3.0.1 on HP-UX 11.23 (Itanium)

Balazs Scheidler bazsi at balabit.hu
Wed Apr 22 13:13:14 CEST 2009


Hi,

This patch should fix this problem (I've also pushed it to the public
git repository)

diff --git a/src/compat.c b/src/compat.c
index cfa384f..9326e42 100644
--- a/src/compat.c
+++ b/src/compat.c
@@ -31,7 +31,7 @@
 #if !HAVE_PREAD || HAVE_BROKEN_PREAD
 
 ssize_t 
-__pread(int fd, void *buf, size_t count, off_t offset)
+bb__pread(int fd, void *buf, size_t count, off_t offset)
 {
   ssize_t ret;
   off_t old_offset;
@@ -53,7 +53,7 @@ __pread(int fd, void *buf, size_t count, off_t offset)
 }
 
 ssize_t 
-__pwrite(int fd, const void *buf, size_t count, off_t offset)
+bb__pwrite(int fd, const void *buf, size_t count, off_t offset)
 {
   ssize_t ret;
   off_t old_offset;
diff --git a/src/compat.h b/src/compat.h
index ce66c45..0191553 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -28,11 +28,11 @@
 #include <sys/types.h>
 
 #if !HAVE_PREAD || HAVE_BROKEN_PREAD
-#define pread __pread
-#define pwrite __pwrite
+#define pread bb__pread
+#define pwrite bb__pwrite
 
-ssize_t __pread(int fd, void *buf, size_t count, off_t offset);
-ssize_t __pwrite(int fd, const void *buf, size_t count, off_t offset);
+ssize_t bb__pread(int fd, void *buf, size_t count, off_t offset);
+ssize_t bb__pwrite(int fd, const void *buf, size_t count, off_t offset);
 
 #endif
 


On Wed, 2009-04-15 at 14:01 +0200, Monz Roswitha wrote:
> Hi,
> 
> I am trying to build syslog-ng-3.0.1 on HP-UX Itanium (64-bit) box. I am 
> running ./configure CFLAGS="-U_XOPEN_SOURCE -U_XOPEN_SOURCE_EXTENDED -D_HPUX_SOURCE"
> and it is giving following error messages while 'make':
> 
>         if gcc -DHAVE_CONFIG_H -I. -I. -I..    -I/usr/local/include/glib-2.0 -I/usr/local/lib/hpux32/glib-2.0/include   -I/usr/local/include/eventlog   -I/usr/local/include     -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -U_XOPEN_SOURCE -U_XOPEN_SOURCE_EXTENDED -D_HPUX_SOURCE -Wall -U_XOPEN_SOURCE -U_XOPEN_SOURCE_EXTENDED -D_HPUX_SOURCE -MT compat.o -MD -MP -MF ".deps/compat.Tpo" -c -o compat.o compat.c; \
>         then mv -f ".deps/compat.Tpo" ".deps/compat.Po"; else rm -f ".deps/compat.Tpo"; exit 1; fi
> compat.c:35: error: redefinition of '__pread'
> /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/include/sys/unistd.h:584: error: previous definition of '__pread' was here
> compat.c:57: error: redefinition of '__pwrite'
> /usr/local/lib/gcc/ia64-hp-hpux11.23/3.4.3/include/sys/unistd.h:586: error: previous definition of '__pwrite' was here
> *** Error exit code 1
> 
> Stop.
> *** Error exit code 1
> 
> Stop.
> *** Error exit code 1
> 
> Stop.
> 
> How can I solve this problem?
> 
> Is a binary for HP-UX 11.23 Itanium (IA64) planed?
> 
> Thanks for help.
> 
> Kind regards,
> 
> Roswitha
> 
> Mit freundlichen Grüßen
> Roswitha Monz, OCP
> --
> Systemadministratorin Unix & Oracle
> Server-Netzwerk-Betrieb
> _____________________________________________________________
> Gemeinnützige Salzburger Landeskliniken Betriebsgesellschaft mbH
> Servicebereich Informatik und Medizintechnik
> Müllner Hauptstraße 48, A-5020 Salzburg
> Tel.: +43-(0)662-4482-4938
> Mob.: +43(0)664-604141-4938
> Fax +43(0)662 4482-4908
> mailto:r.monz at salk.at
> Internet: http://www.salk.at
> 
> 
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.campin.net/syslog-ng/faq.html
> 
> 
-- 
Bazsi




More information about the syslog-ng mailing list