summaryrefslogtreecommitdiff
path: root/pkg/efivar
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2017-02-17 19:45:14 -0800
committerMichael Forney <mforney@mforney.org>2017-02-17 23:18:22 -0800
commit51b219709b26cb72ab6c9739bc1ec2041fe7b5a0 (patch)
tree2154a087d1aa429140ffaeeb0e195751a4d0024d /pkg/efivar
parentd7810eb9771c12e4e908509168332bdf25dfa251 (diff)
efivar, efibootmgr: Update to 31, 14
Diffstat (limited to 'pkg/efivar')
-rw-r--r--pkg/efivar/compat.h11
-rw-r--r--pkg/efivar/gen.rc3
-rw-r--r--pkg/efivar/patch/0001-Workaround-rename-of-linux-nvme.h.patch30
-rw-r--r--pkg/efivar/rev2
m---------pkg/efivar/src0
5 files changed, 13 insertions, 33 deletions
diff --git a/pkg/efivar/compat.h b/pkg/efivar/compat.h
index 4f4842f7..e415141a 100644
--- a/pkg/efivar/compat.h
+++ b/pkg/efivar/compat.h
@@ -1,3 +1,12 @@
#ifndef __bswap_constant_16
-#define __bswap_constant_16(x) ((x)<<8&0xff00 | (x)>>8&0xff)
+#define __bswap_constant_16(x) (((x)<<8&0xff00) | ((x)>>8&0xff))
+#endif
+#ifndef strndupa
+#define strndupa(s, n) ({\
+ const char *__s2 = (s);\
+ size_t __n = strnlen(__s2, (n));\
+ char *__s1 = alloca(__n + 1);\
+ __s1[__n] = '\0';\
+ (char *)memcpy(__s1, __s2, __n);\
+})
#endif
diff --git a/pkg/efivar/gen.rc b/pkg/efivar/gen.rc
index 3bb5a948..45b5451f 100644
--- a/pkg/efivar/gen.rc
+++ b/pkg/efivar/gen.rc
@@ -2,6 +2,7 @@ cc src/guids.S '||' '$outdir'/^(guids.bin names.bin) ; with\
cflags '$cflags -I $outdir'
cflags\
+ -Wall -Wextra\
-D _GNU_SOURCE\
-include '$dir'/compat.h\
-I '$outdir'/include\
@@ -32,7 +33,7 @@ lib libefiboot.a -d '$outdir'/include/efivar-guids.h src/^(\
)
lib libefivar.a -d '$outdir'/include/efivar-guids.h src/^(\
dp.c dp-acpi.c dp-hw.c dp-media.c dp-message.c\
- efivarfs.c export.c guid.c guids.S.o\
+ efivarfs.c error.c export.c guid.c guids.S.o\
lib.c vars.c\
) '$outdir'/guid-symbols.c
diff --git a/pkg/efivar/patch/0001-Workaround-rename-of-linux-nvme.h.patch b/pkg/efivar/patch/0001-Workaround-rename-of-linux-nvme.h.patch
deleted file mode 100644
index d18b779f..00000000
--- a/pkg/efivar/patch/0001-Workaround-rename-of-linux-nvme.h.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 2b91a687fc2734ee53abfb02b115ea546f46c6f1 Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Thu, 14 Jan 2016 17:02:31 -0500
-Subject: [PATCH] Workaround rename of linux/nvme.h
-
-Bug: https://bugs.gentoo.org/571548
----
- src/linux.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/linux.c b/src/linux.c
-index b618cfd..9388cd3 100644
---- a/src/linux.c
-+++ b/src/linux.c
-@@ -22,7 +22,12 @@
- #include <inttypes.h>
- #include <limits.h>
- #include <linux/ethtool.h>
-+#include <linux/version.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
-+#include <linux/nvme_ioctl.h>
-+#else
- #include <linux/nvme.h>
-+#endif
- #include <linux/sockios.h>
- #include <net/if.h>
- #include <scsi/scsi.h>
---
-2.9.0
-
diff --git a/pkg/efivar/rev b/pkg/efivar/rev
index d00491fd..0cfbf088 100644
--- a/pkg/efivar/rev
+++ b/pkg/efivar/rev
@@ -1 +1 @@
-1
+2
diff --git a/pkg/efivar/src b/pkg/efivar/src
-Subproject 6478af5af7e2fc8fa2247a47b6db9f2a5dc9136
+Subproject 01d37d200f66d4792a806595bfe144c26ca8795