forked from pool/ipmitool
Thomas Renninger
63ed82d084
- Update to latest ipmitool sources. This is version 1.8.15 (git tag: IPMITOOL_1_8_15) plus mainline patches up to commit 708be8bc450f907cddb6d9e4b83aee6ba67b7d04 Date: Fri Jan 9 12:48:35 2015 +0100 OBS-URL: https://build.opensuse.org/request/show/281420 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/ipmitool?expand=0&rev=28
176 lines
5.0 KiB
Diff
176 lines
5.0 KiB
Diff
Fix compile issues
|
|
|
|
Use _XOPEN_SOURCE 500 in ipmi_main to get getpass defined.
|
|
from manpage:
|
|
getpass():
|
|
Since glibc 2.2.2:
|
|
_BSD_SOURCE ||
|
|
(_XOPEN_SOURCE >= 500 ||
|
|
_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) &&
|
|
!(_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600)
|
|
|
|
and more compiler warning fixing stuff...
|
|
|
|
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
|
|
|
Index: ipmitool-1.8.15/lib/ipmi_chassis.c
|
|
===================================================================
|
|
--- ipmitool-1.8.15.orig/lib/ipmi_chassis.c 2015-01-14 16:28:54.020808802 +0100
|
|
+++ ipmitool-1.8.15/lib/ipmi_chassis.c 2015-01-15 10:16:29.193827184 +0100
|
|
@@ -30,6 +30,7 @@
|
|
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
*/
|
|
|
|
+#include <config.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <stdio.h>
|
|
Index: ipmitool-1.8.15/lib/ipmi_main.c
|
|
===================================================================
|
|
--- ipmitool-1.8.15.orig/lib/ipmi_main.c 2015-01-14 14:44:12.916708941 +0100
|
|
+++ ipmitool-1.8.15/lib/ipmi_main.c 2015-01-15 10:17:02.977827721 +0100
|
|
@@ -29,7 +29,7 @@
|
|
* LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,
|
|
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
*/
|
|
-#define _XOPEN_SOURCE 700
|
|
+#define _XOPEN_SOURCE 500
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
Index: ipmitool-1.8.15/lib/ipmi_sel.c
|
|
===================================================================
|
|
--- ipmitool-1.8.15.orig/lib/ipmi_sel.c 2015-01-14 14:44:12.916708941 +0100
|
|
+++ ipmitool-1.8.15/lib/ipmi_sel.c 2015-01-15 10:25:03.161835356 +0100
|
|
@@ -2391,18 +2391,18 @@
|
|
evt.sel_type.standard_type.timestamp;
|
|
|
|
/* skip timestamp */
|
|
- cursor = index((const char *)cursor, ';');
|
|
+ cursor = strchr((const char *)cursor, ';');
|
|
cursor++;
|
|
|
|
/* FIXME: parse originator */
|
|
evt.sel_type.standard_type.gen_id = 0x0020;
|
|
|
|
/* skip originator info */
|
|
- cursor = index((const char *)cursor, ';');
|
|
+ cursor = strchr((const char *)cursor, ';');
|
|
cursor++;
|
|
|
|
/* Get sensor type */
|
|
- cursor = index((const char *)cursor, '(');
|
|
+ cursor = strchr((const char *)cursor, '(');
|
|
cursor++;
|
|
|
|
errno = 0;
|
|
@@ -2413,7 +2413,7 @@
|
|
status = (-1);
|
|
break;
|
|
}
|
|
- cursor = index((const char *)cursor, ',');
|
|
+ cursor = strchr((const char *)cursor, ',');
|
|
cursor++;
|
|
|
|
errno = 0;
|
|
@@ -2426,7 +2426,7 @@
|
|
}
|
|
|
|
/* skip to event type info */
|
|
- cursor = index((const char *)cursor, ':');
|
|
+ cursor = strchr((const char *)cursor, ':');
|
|
cursor++;
|
|
|
|
errno = 0;
|
|
@@ -2439,7 +2439,7 @@
|
|
}
|
|
|
|
/* skip to event dir info */
|
|
- cursor = index((const char *)cursor, '(');
|
|
+ cursor = strchr((const char *)cursor, '(');
|
|
cursor++;
|
|
if (*cursor == 'a') {
|
|
evt.sel_type.standard_type.event_dir = 0;
|
|
@@ -2447,7 +2447,7 @@
|
|
evt.sel_type.standard_type.event_dir = 1;
|
|
}
|
|
/* skip to data info */
|
|
- cursor = index((const char *)cursor, ' ');
|
|
+ cursor = strchr((const char *)cursor, ' ');
|
|
cursor++;
|
|
|
|
if (evt.sel_type.standard_type.sensor_type == 0xF0) {
|
|
@@ -2466,7 +2466,7 @@
|
|
}
|
|
|
|
/* Get to previous state */
|
|
- cursor = index((const char *)cursor, 'M');
|
|
+ cursor = strchr((const char *)cursor, 'M');
|
|
cursor++;
|
|
|
|
/* Set previous state */
|
|
@@ -2480,7 +2480,7 @@
|
|
}
|
|
|
|
/* Get to current state */
|
|
- cursor = index((const char *)cursor, 'M');
|
|
+ cursor = strchr((const char *)cursor, 'M');
|
|
cursor++;
|
|
|
|
/* Set current state */
|
|
@@ -2494,7 +2494,7 @@
|
|
}
|
|
|
|
/* skip to cause */
|
|
- cursor = index((const char *)cursor, '=');
|
|
+ cursor = strchr((const char *)cursor, '=');
|
|
cursor++;
|
|
errno = 0;
|
|
evt.sel_type.standard_type.event_data[1] |=
|
|
@@ -2513,7 +2513,7 @@
|
|
status = (-1);
|
|
break;
|
|
}
|
|
- cursor = index((const char *)cursor, ' ');
|
|
+ cursor = strchr((const char *)cursor, ' ');
|
|
cursor++;
|
|
|
|
errno = 0;
|
|
@@ -2525,7 +2525,7 @@
|
|
break;
|
|
}
|
|
|
|
- cursor = index((const char *)cursor, ' ');
|
|
+ cursor = strchr((const char *)cursor, ' ');
|
|
cursor++;
|
|
|
|
errno = 0;
|
|
Index: ipmitool-1.8.15/src/ipmishell.c
|
|
===================================================================
|
|
--- ipmitool-1.8.15.orig/src/ipmishell.c 2015-01-14 14:44:12.924708941 +0100
|
|
+++ ipmitool-1.8.15/src/ipmishell.c 2015-01-15 10:27:18.445837506 +0100
|
|
@@ -30,6 +30,9 @@
|
|
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
*/
|
|
|
|
+/* strdup needs this */
|
|
+#define _XOPEN_SOURCE 500
|
|
+
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
#include <errno.h>
|
|
Index: ipmitool-1.8.15/lib/log.c
|
|
===================================================================
|
|
--- ipmitool-1.8.15.orig/lib/log.c 2015-01-14 15:37:57.444760206 +0100
|
|
+++ ipmitool-1.8.15/lib/log.c 2015-01-15 10:28:25.441838572 +0100
|
|
@@ -30,6 +30,9 @@
|
|
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
*/
|
|
|
|
+/* strdup needs this */
|
|
+#define _XOPEN_SOURCE 500
|
|
+
|
|
#include <unistd.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|