fix building on freebsd 13

This commit is contained in:
Eric Hocking 2023-05-05 16:32:42 +00:00
parent 262aa6c24e
commit 2a846109b8
2 changed files with 9 additions and 1 deletions

View file

@ -162,7 +162,11 @@ static alpm_list_t *mount_point_list(alpm_handle_t *handle)
for(; entries-- > 0; fsp++) { for(; entries-- > 0; fsp++) {
CALLOC(mp, 1, sizeof(alpm_mountpoint_t), RET_ERR(handle, ALPM_ERR_MEMORY, NULL)); CALLOC(mp, 1, sizeof(alpm_mountpoint_t), RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
#if __APPLE__
STRDUP(mp->mount_dir, fsp->f_mntonname, free(mp); RET_ERR(handle, ALPM_ERR_MEMORY, NULL)); STRDUP(mp->mount_dir, fsp->f_mntonname, free(mp); RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
#else
STRDUP(mp->mount_dir, mp->mount_dir, free(mp); RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
#endif
mp->mount_dir_len = strlen(mp->mount_dir); mp->mount_dir_len = strlen(mp->mount_dir);
memcpy(&(mp->fsp), fsp, sizeof(FSSTATSTYPE)); memcpy(&(mp->fsp), fsp, sizeof(FSSTATSTYPE));
#if defined(HAVE_GETMNTINFO_STATVFS) && defined(HAVE_STRUCT_STATVFS_F_FLAG) #if defined(HAVE_GETMNTINFO_STATVFS) && defined(HAVE_STRUCT_STATVFS_F_FLAG)

View file

@ -28,7 +28,12 @@ LIBMAKEPKGDIR = join_paths(PREFIX, DATAROOTDIR, 'makepkg')
PKGDATADIR = join_paths(PREFIX, DATAROOTDIR, meson.project_name()) PKGDATADIR = join_paths(PREFIX, DATAROOTDIR, meson.project_name())
KEYRINGDIR = join_paths(PREFIX, DATAROOTDIR, get_option('keyringdir')) KEYRINGDIR = join_paths(PREFIX, DATAROOTDIR, get_option('keyringdir'))
os = host_machine.system()
if os.contains('bsd')
PYTHON = import('python').find_installation('python3.9')
else
PYTHON = import('python').find_installation('python3') PYTHON = import('python').find_installation('python3')
endif
LDCONFIG = get_option('ldconfig') LDCONFIG = get_option('ldconfig')
MESON_MAKE_SYMLINK = join_paths(meson.project_source_root(), 'build-aux/meson-make-symlink.sh') MESON_MAKE_SYMLINK = join_paths(meson.project_source_root(), 'build-aux/meson-make-symlink.sh')
@ -243,7 +248,6 @@ if file_seccomp.enabled() or ( file_seccomp.auto() and filever.version_compare('
filecmd = 'file -S' filecmd = 'file -S'
endif endif
os = host_machine.system()
if os.startswith('darwin') if os.startswith('darwin')
inodecmd = '/usr/bin/stat -f \'%i %N\'' inodecmd = '/usr/bin/stat -f \'%i %N\''
strip_binaries = '' strip_binaries = ''