efivar: portability patch to unbreak musl builds.
This commit is contained in:
parent
9c552c6c64
commit
aa2caeb2d3
|
@ -0,0 +1,28 @@
|
|||
Portability fixes:
|
||||
|
||||
- Initialize outbuf with the expected size! fixes a segfault with musl.
|
||||
- Really use __builtin_va_arg_pack_len().
|
||||
|
||||
--- src/makeguids.c 2014-12-28 10:30:36.731270900 +0100
|
||||
+++ src/makeguids.c 2014-12-28 10:26:24.743259656 +0100
|
||||
@@ -100,7 +100,7 @@ main(int argc, char *argv[])
|
||||
err(1, "makeguids: could not read \"%s\"", argv[1]);
|
||||
|
||||
/* strictly speaking, this *has* to be too large. */
|
||||
- struct guidname *outbuf = calloc(inlen, sizeof (char));
|
||||
+ struct guidname *outbuf = calloc(inlen, sizeof (struct guidname));
|
||||
if (!outbuf)
|
||||
err(1, "makeguids");
|
||||
|
||||
--- src/efivar.h 2014-12-28 10:30:36.731270900 +0100
|
||||
+++ src/efivar.h 2014-12-28 10:26:57.359261112 +0100
|
||||
@@ -85,7 +85,7 @@ efi_set_variable(efi_guid_t guid, const
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (__va_arg_pack_len() == 0)
|
||||
+ if (__builtin_va_arg_pack_len() == 0)
|
||||
return _efi_set_variable(guid, name, data, data_size,
|
||||
attributes, 0644);
|
||||
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'efivar'
|
||||
pkgname=efivar
|
||||
version=0.15
|
||||
revision=1
|
||||
revision=2
|
||||
build_style=gnu-configure
|
||||
hostmakedepends="git"
|
||||
makedepends="popt-devel"
|
||||
|
@ -10,7 +10,7 @@ maintainer="Juan RP <xtraeme@gmail.com>"
|
|||
license="LGPL-2.1"
|
||||
homepage="https://github.com/vathpela/efivar"
|
||||
|
||||
only_for_archs="i686 x86_64"
|
||||
only_for_archs="i686 i686 x86_64 x86_64-musl"
|
||||
|
||||
do_fetch() {
|
||||
git clone -b ${version} git://github.com/vathpela/efivar ${pkgname}-${version}
|
||||
|
|
Loading…
Reference in New Issue