You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-apps/salinfo/files/salinfo-1.2-build.patch

48 lines
1.2 KiB

--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+prefix = $(DESTDIR)
mandir := /usr/share/man
sbindir := /usr/sbin
logdir := /var/log/salinfo
@@ -5,7 +6,7 @@ initdir := /etc/rc.d/init.d
sysconfigdir := /etc/sysconfig
logrotate := /etc/logrotate.d
-CFLAGS += -Wall -g -O2 $(EXTRA_CFLAGS)
+CFLAGS += -Wall $(EXTRA_CFLAGS)
export CFLAGS
ifneq ($(VPATH),)
--- a/sal.h
+++ b/sal.h
@@ -27,6 +27,8 @@
* Keith Owens <kaos@sgi.com>
*/
+#include <asm/fpu.h>
+
#include "efi.h"
#include "pal.h"
--- a/salinfo_decode.c
+++ b/salinfo_decode.c
@@ -303,7 +303,7 @@ log_dropped_records(void)
snprintf(line, sizeof(line), ", %d %s",
dropped_all[i]->dropped, dropped_all[i]->name);
dropped_all[i]->dropped = 0;
- strncat(log, line, sizeof(log));
+ strncat(log, line, sizeof(log) - strlen(log));
}
}
syslog(LOG_NOTICE, "%s", log);
@@ -424,7 +424,7 @@ talk_to_sal (void)
int fd;
char filename[PATH_MAX];
snprintf(filename, sizeof(filename), "%s/%s/.check", directory, rd[i]);
- if ((fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC)) < 0) {
+ if ((fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0644)) < 0) {
perror(filename);
goto out;
}