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-boot/elilo/files/elilo-3.16-strncpy-clash.patch

24 lines
744 B

gnu-efi-3.0.8 added StrnCpy. This caused conflict with elilo's definition:
./../fs/../strops.h:30:16: error: conflicting types for 'StrnCpy'
extern CHAR16 *StrnCpy(OUT CHAR16 *dst, IN const CHAR16 *src, UINTN count);
^~~~~~~
Work it around by always using private copy.
Reported-by: Bill Glessner
--- a/strops.h
+++ b/strops.h
@@ -29,3 +29,4 @@
extern CHAR16 *StrChr(IN const CHAR16 *s, const CHAR16 c);
+#define StrnCpy elilo_StrnCpy
extern CHAR16 *StrnCpy(OUT CHAR16 *dst, IN const CHAR16 *src, UINTN count);
extern CHAR8 *StrnXCpy(OUT CHAR8 *dst, IN const CHAR16 *src, UINTN count);
--- a/strops.c
+++ b/strops.c
@@ -27,4 +27,6 @@
#include <efilib.h>
+#include "strops.h"
+
//#define CHAR_NULL (CHAR16)'\0'