diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-09-11 15:41:16 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-09-11 15:41:16 -0300 |
commit | bdc4f67889c958c1266fa5d0cab71c3cd639122f (patch) | |
tree | f4faaf11bc34ceef281cd9f5e64d7e867d2af667 /community/libsmbios/fixes.patch | |
parent | dc6b0f243379b9fa6accd43faa90f8df8e4493f7 (diff) | |
download | aports-bdc4f67889c958c1266fa5d0cab71c3cd639122f.tar.bz2 aports-bdc4f67889c958c1266fa5d0cab71c3cd639122f.tar.xz |
community/libsmbios: move from unmaintained
Diffstat (limited to 'community/libsmbios/fixes.patch')
-rw-r--r-- | community/libsmbios/fixes.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/community/libsmbios/fixes.patch b/community/libsmbios/fixes.patch new file mode 100644 index 0000000000..cab5e9c593 --- /dev/null +++ b/community/libsmbios/fixes.patch @@ -0,0 +1,47 @@ +diff -ru libsmbios-2.4.2.orig/src/libsmbios_c/cmos/cmos_linux.c libsmbios-2.4.2/src/libsmbios_c/cmos/cmos_linux.c +--- libsmbios-2.4.2.orig/src/libsmbios_c/cmos/cmos_linux.c 2018-06-06 17:40:24.000000000 +0300 ++++ libsmbios-2.4.2/src/libsmbios_c/cmos/cmos_linux.c 2019-06-07 16:37:59.007546237 +0300 +@@ -35,6 +35,13 @@ + // private + #include "cmos_impl.h" + ++#ifndef outb_p ++#define outb_p outb ++#endif ++#ifndef inb_p ++#define inb_p inb ++#endif ++ + static int linux_read_fn(const struct cmos_access_obj *this, u8 *byte, u32 indexPort, u32 dataPort, u32 offset) + { + outb_p (offset, indexPort); +diff -ru libsmbios-2.4.2.orig/src/libsmbios_c/common/common.c libsmbios-2.4.2/src/libsmbios_c/common/common.c +--- libsmbios-2.4.2.orig/src/libsmbios_c/common/common.c 2018-06-06 17:40:24.000000000 +0300 ++++ libsmbios-2.4.2/src/libsmbios_c/common/common.c 2019-06-07 16:34:05.293776855 +0300 +@@ -26,10 +26,15 @@ + + if ((size_t)(bufsize - curstrsize - 1) < bufsize) + { ++#ifdef __GLIBC__ + char *buf = strerror_r(errval, errbuf + curstrsize, bufsize - curstrsize - 1); + // GNU breakage... :( + if (buf != (errbuf + curstrsize)) + strlcat(errbuf, buf, bufsize); ++#else ++ /* XSI compliant strerror_r() */ ++ strerror_r(errval, errbuf + curstrsize, bufsize - curstrsize - 1); ++#endif + } + } + #endif +diff -ru libsmbios-2.4.2.orig/src/libsmbios_c/smi/smi_linux.c libsmbios-2.4.2/src/libsmbios_c/smi/smi_linux.c +--- libsmbios-2.4.2.orig/src/libsmbios_c/smi/smi_linux.c 2018-06-06 17:40:24.000000000 +0300 ++++ libsmbios-2.4.2/src/libsmbios_c/smi/smi_linux.c 2019-06-07 16:34:05.293776855 +0300 +@@ -26,6 +26,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <fcntl.h> + #include <sys/file.h> // flock + #include <sys/ioctl.h> // ioctl + #include <errno.h> |