ysulsky avatar ysulsky committed 55f393f

fix usages of getconf

Comments (0)

Files changed (2)

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,
     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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.