[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freeipmi-users] make compile error on x86_64 opteron
From: |
Anand Babu |
Subject: |
Re: [Freeipmi-users] make compile error on x86_64 opteron |
Date: |
Sun, 09 Jan 2005 16:18:59 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) |
,----[ "Jan Tiri" <address@hidden> ]
| In file included from xmalloc.c:22:
| xmalloc.h:77: error: conflicting types for 'error'
| xmalloc.h:77: note: a parameter list with an ellipsis can't match an empty
| parameter name list declaration
| /usr/include/error.h:47: error: previous declaration of 'error' was here
| xmalloc.h:77: error: conflicting types for 'error'
| xmalloc.h:77: note: a parameter list with an ellipsis can't match an empty
| parameter name list declaration
| /usr/include/error.h:47: error: previous declaration of 'error' was here
| make[3]: *** [xmalloc.o] Error 1
| make[3]: Leaving directory `/tmp/freeipmi-0.1.3/fish/src'
| make[2]: *** [all-recursive] Error 1
| make[2]: Leaving directory `/tmp/freeipmi-0.1.3/fish'
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/tmp/freeipmi-0.1.3'
| make: *** [all] Error 2
`----
Cut the patch in this email and save it in a file, say
/tmp/freeipmi-0.1.3-errorh.diff and apply the patch like below.
address@hidden:/tmp# cd freeipmi-0.1.3
address@hidden:/tmp/freeipmi-0.1.3# patch -p1 < ../freeipmi-0.1.3-errorh.diff
patching file fish/src/fi-commands.c
patching file fish/src/fi-utils.c
patching file fish/src/fish.c
patching file fish/src/xmalloc.c
patching file fish/src/xmalloc.h
address@hidden:/tmp/freeipmi-0.1.3#
-------8><-------8><----[ cut here ]-----8><-------8><--------
diff -rpuN freeipmi-0.1.3/fish/src/fi-commands.c
freeipmi-0.1.3-ab/fish/src/fi-commands.c
--- freeipmi-0.1.3/fish/src/fi-commands.c 2004-05-06 15:26:27.000000000
-0700
+++ freeipmi-0.1.3-ab/fish/src/fi-commands.c 2005-01-09 16:02:34.000000000
-0800
@@ -42,7 +42,6 @@
#endif
#include "freeipmi.h"
-#include <error.h>
#include "fish.h"
#include "fi-utils.h"
diff -rpuN freeipmi-0.1.3/fish/src/fi-utils.c
freeipmi-0.1.3-ab/fish/src/fi-utils.c
--- freeipmi-0.1.3/fish/src/fi-utils.c 2004-05-05 14:00:19.000000000 -0700
+++ freeipmi-0.1.3-ab/fish/src/fi-utils.c 2005-01-09 15:59:48.000000000
-0800
@@ -80,7 +80,6 @@ strchr (const char* s, int c)
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
-#include <error.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -319,7 +318,10 @@ open_free_udp_port (void)
sockfd = socket (AF_INET, SOCK_DGRAM, 0);
if (sockfd < 0)
- error (EXIT_FAILURE, errno, "open_free_udp_port[socket]");
+ {
+ perror ("open_free_udp_port");
+ exit (EXIT_FAILURE);
+ }
for (; free_port < 65535; free_port++)
{
@@ -336,11 +338,16 @@ open_free_udp_port (void)
if (errno == EADDRINUSE)
continue;
else
- error (EXIT_FAILURE, errno, "open_free_udp_port [bind err]");
+ {
+ perror ("open_free_udp_port [bind error]");
+ exit (EXIT_FAILURE);
+ }
}
}
close (sockfd);
- error (EXIT_FAILURE, errno, "open_free_udp_port [no free port]");
+ perror ("open_free_udp_port [bind error]");
+ exit (EXIT_FAILURE);
+
// avoid compiler warning
return (-1);
}
diff -rpuN freeipmi-0.1.3/fish/src/fish.c freeipmi-0.1.3-ab/fish/src/fish.c
--- freeipmi-0.1.3/fish/src/fish.c 2004-10-21 17:17:08.000000000 -0700
+++ freeipmi-0.1.3-ab/fish/src/fish.c 2005-01-09 16:01:55.000000000 -0800
@@ -36,7 +36,6 @@
#include <sys/stat.h>
#include <sys/resource.h>
#include <sys/socket.h>
-#include <error.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -171,13 +170,19 @@ fi_set_sock_timeout (unsigned int sock_t
if (setsockopt(fi_sockfd, SOL_SOCKET, SO_RCVTIMEO,
&time, sizeof(time)) < 0)
- error(1, errno, "setsockopt (SO_RCVTIMEO)");
+ {
+ perror ("setsockopt (SO_RCVTIMEO)");
+ exit (EXIT_FAILURE);
+ }
/*
time.tv_sec = fi_get_sock_timeout () / 1000;
time.tv_usec = (fi_get_sock_timeout () % 1000) * 1000;
if (setsockopt(fi_sockfd, SOL_SOCKET, SO_SNDTIMEO,
&time, sizeof(time)) < 0)
- error(1, errno, "setsockopt (SO_SNDTIMEO)");
+ {
+ perror ("setsockopt (SO_RCVTIMEO)");
+ exit (EXIT_FAILURE);
+ }
*/
}
diff -rpuN freeipmi-0.1.3/fish/src/xmalloc.c
freeipmi-0.1.3-ab/fish/src/xmalloc.c
--- freeipmi-0.1.3/fish/src/xmalloc.c 2004-05-05 14:00:19.000000000 -0700
+++ freeipmi-0.1.3-ab/fish/src/xmalloc.c 2005-01-09 16:02:12.000000000
-0800
@@ -19,6 +19,7 @@
#include <config.h>
#endif
+#include <stdio.h>
#include "xmalloc.h"
/* Prototypes for functions defined here. */
@@ -40,7 +41,10 @@ fixup_null_alloc (n)
if (n == 0)
p = malloc ((size_t) 1);
if (p == 0)
- error (xmalloc_exit_failure, 0, _("Memory exhausted"));
+ {
+ perror ("malloc");
+ exit (xmalloc_exit_failure);
+ }
return p;
}
diff -rpuN freeipmi-0.1.3/fish/src/xmalloc.h
freeipmi-0.1.3-ab/fish/src/xmalloc.h
--- freeipmi-0.1.3/fish/src/xmalloc.h 2004-05-05 14:00:19.000000000 -0700
+++ freeipmi-0.1.3-ab/fish/src/xmalloc.h 2005-01-09 15:56:16.000000000
-0800
@@ -56,8 +56,6 @@ void free ();
# define _(Text) Text
#endif
-#include "error.h"
-
#ifndef EXIT_FAILURE
# define EXIT_FAILURE 1
#endif
@@ -71,12 +69,6 @@ char *xstrdup (char *p);
void xfree (__VOID *p);
#endif
-#if __STDC__ && (HAVE_VPRINTF || HAVE_DOPRNT)
-void error (int, int, const char *, ...);
-#else
-void error ();
-#endif
-
#ifdef __cplusplus
}
#endif
-------8><-------8><----[ cut here ]-----8><-------8><--------
,----[ "Jan Tiri" <address@hidden> ]
| If this is a simple compile error, please don't shoot me as I'm not
| a programmer :)
`----
Please do not feel that way. You are making a valuable contribution by
reporting such bugs. They are really hard to find and we have no
access or time to test on a wide variety of architectures. I should
thank you.
--
Anand Babu
Free as in Freedom <www.gnu.org>