Commits

ysulsky  committed 55f393f

fix usages of getconf

  • Participants
  • Parent commits 57b5768

Comments (0)

Files changed (2)

File base/core/oasis.sh

   FindlibName:        core
   #Pack:               true
   Modules:${MODULES}
-  CCOpt:              $(getconf LFS64_CFLAGS)
+  CCOpt:              $(getconf LFS64_CFLAGS 2>/dev/null)
   CSources:           ${CSOURCES}
   CCLib:              ${CCLIB}
   BuildDepends:       variantslib,

File build-common.sh

     done
 }
 
+function getconf_or_zero {
+    local ret=$(getconf "$@" 2>/dev/null)
+    case "$ret" in
+	[0-9][0-9]*) echo "$ret" ;;
+	*) echo 0 ;;
+    esac
+}
+
 function check_posix_timers_enabled {
     enable_timers=false
     enable_timers_default="--disable-posix-timers"
-    if [[ $(getconf _POSIX_TIMERS 2>/dev/null) -ge 200112 ]]; then
+    if [[ $(getconf_or_zero _POSIX_TIMERS) -ge 200112 ]]; then
         enable_timers=true
         enable_timers_default="--enable-posix-timers"
     fi