libdnf icon indicating copy to clipboard operation
libdnf copied to clipboard

FreeBSD compatibility patches

Open yurivict opened this issue 4 years ago • 1 comments

yurivict avatar Apr 14 '21 20:04 yurivict

@dmach

Is it because getauxval() or AT_HWCAP is not available?

getauxval isn't available on FreeBSD. Instead FreeBSD has elf_aux_info(3):

NAME
     elf_aux_info – extract data from the elf auxiliary vector of the current
     process

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <sys/auxv.h>

     int
     elf_aux_info(int aux, void *buf, int buflen);

DESCRIPTION
     The elf_aux_info() function retrieves the auxiliary info vector requested
     in aux.  The information is stored into the provided buffer if it will
     fit.  The following values, defined in <sys/elf_common.h> can be
     requested (corresponding buffer sizes are specified in parenthesis):

     AT_CANARY     The canary value for SSP (arbitrary sized buffer, as many
                   bytes are returned as it fits into it, rest is zeroed).

     AT_EXECPATH   The path of executed program (MAXPATHLEN). This may not be
                   present if the process was initialized by fexecve(2) and
                   the namecache no longer contains the file's name.

     AT_HWCAP      CPU / hardware feature flags (sizeof(u_long)).

     AT_HWCAP2     CPU / hardware feature flags (sizeof(u_long)).

     AT_NCPUS      Number of CPUs (sizeof(int)).

     AT_OSRELDATE  The OSRELDATE of the kernel or jail the program is running
                   on (sizeof(int)).

     AT_PAGESIZES  Vector of page sizes (arbitrary sized buffer, as many
                   elements of the pagesizes array are returned as it fits).

     AT_PAGESZ     Page size in bytes (sizeof(int)).

     AT_TIMEKEEP   Pointer to VDSO timehands (for library internal use,
                   sizeof(void *)).

yurivict avatar Jan 04 '22 16:01 yurivict

My apology for late reaction. May I ask @yurivict what's your plan with the PR?

j-mracek avatar Aug 28 '23 15:08 j-mracek

I am really sorry but I am closing the PR due to inactivity.

j-mracek avatar Oct 11 '23 09:10 j-mracek