summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rw-r--r--fdisks/fdisksgilabel.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index f7adecb7d..afe0413df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -183,6 +183,7 @@ AC_CHECK_HEADERS([ \
linux/raw.h \
linux/tiocl.h \
linux/version.h \
+ linux/securebits.h \
locale.h \
mntent.h \
net/if.h \
@@ -225,6 +226,7 @@ AC_CHECK_HEADERS([langinfo.h],
dnl Convert some ac_cv_header_* variables to have_*
dnl
have_linux_raw_h=$ac_cv_header_linux_raw_h
+have_linux_securebits_h=$ac_cv_header_linux_securebits_h
have_linux_watchdog_h=$ac_cv_header_linux_watchdog_h
have_security_pam_misc_h=$ac_cv_header_security_pam_misc_h
@@ -926,6 +928,7 @@ AC_ARG_ENABLE([setpriv],
)
UL_BUILD_INIT([setpriv])
UL_REQUIRES_LINUX([setpriv])
+UL_REQUIRES_HAVE([setpriv], [linux_securebits_h], [securebits.h header file])
UL_REQUIRES_HAVE([setpriv], [cap_ng], [libcap-ng])
AM_CONDITIONAL(BUILD_SETPRIV, test "x$build_setpriv" = xyes)
diff --git a/fdisks/fdisksgilabel.c b/fdisks/fdisksgilabel.c
index 9000b3e25..796b4580f 100644
--- a/fdisks/fdisksgilabel.c
+++ b/fdisks/fdisksgilabel.c
@@ -1022,10 +1022,12 @@ static int sgi_toggle_partition_flag(struct fdisk_context *cxt, size_t i, unsign
switch (flag) {
case SGI_FLAG_BOOT:
- sgilabel->boot_part = sgilabel->boot_part == SSWAP16(i) ? 0 : SSWAP16(i);
+ sgilabel->boot_part =
+ (uint16_t) sgilabel->boot_part == SSWAP16(i) ? 0 : SSWAP16(i);
break;
case SGI_FLAG_SWAP:
- sgilabel->swap_part = sgilabel->swap_part == SSWAP16(i) ? 0 : SSWAP16(i);
+ sgilabel->swap_part =
+ (uint16_t) sgilabel->swap_part == SSWAP16(i) ? 0 : SSWAP16(i);
break;
default:
return 1;