mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Fix double declaration of getauxval() for FreeBSD PPC
The extern declaration is only for Linux, move this line into the right #ifdef section. Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Co-authored-by: Martin Matuska <mm@FreeBSD.org> Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de> Closes #13934 Closes #13936
This commit is contained in:
@@ -453,12 +453,12 @@ zfs_avx512vbmi_available(void)
|
||||
#elif defined(__powerpc__)
|
||||
|
||||
/* including <sys/auxv.h> clashes with AT_UID and others */
|
||||
extern unsigned long getauxval(unsigned long type);
|
||||
#if defined(__FreeBSD__)
|
||||
#define AT_HWCAP 25 /* CPU feature flags. */
|
||||
#define AT_HWCAP2 26 /* CPU feature flags 2. */
|
||||
extern int elf_aux_info(int aux, void *buf, int buflen);
|
||||
static unsigned long getauxval(unsigned long key)
|
||||
static inline unsigned long
|
||||
getauxval(unsigned long key)
|
||||
{
|
||||
unsigned long val = 0UL;
|
||||
|
||||
@@ -470,6 +470,7 @@ static unsigned long getauxval(unsigned long key)
|
||||
#elif defined(__linux__)
|
||||
#define AT_HWCAP 16 /* CPU feature flags. */
|
||||
#define AT_HWCAP2 26 /* CPU feature flags 2. */
|
||||
extern unsigned long getauxval(unsigned long type);
|
||||
#endif
|
||||
|
||||
#define kfpu_allowed() 1
|
||||
|
||||
Reference in New Issue
Block a user