diff options
Diffstat (limited to 'sys-apps/salinfo/files/salinfo-1.2-build.patch')
-rw-r--r-- | sys-apps/salinfo/files/salinfo-1.2-build.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/sys-apps/salinfo/files/salinfo-1.2-build.patch b/sys-apps/salinfo/files/salinfo-1.2-build.patch new file mode 100644 index 000000000000..848b363939af --- /dev/null +++ b/sys-apps/salinfo/files/salinfo-1.2-build.patch @@ -0,0 +1,47 @@ +--- 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; + } |