From: Waldemar Kozaczuk <[email protected]>
Committer: Waldemar Kozaczuk <[email protected]>
Branch: master

sysconf: handle _SC_MINSIGSTKSZ and _SC_SIGSTKSZ

New versions (>= ~1.74) of boost unit test library used by some of our
tests started using sysconf() with argument _SC_SIGSTKSZ to determine
size of the signal stack size.

This patch enhances the sysconf() implementation to handle _SC_MINSIGSTKSZ
and _SC_SIGSTKSZ.

Signed-off-by: Waldemar Kozaczuk <[email protected]>

---
diff --git a/include/api/unistd.h b/include/api/unistd.h
--- a/include/api/unistd.h
+++ b/include/api/unistd.h
@@ -470,6 +470,8 @@ void syncfs(int);
 #define _SC_XOPEN_STREAMS      246
 #define _SC_THREAD_ROBUST_PRIO_INHERIT 247
 #define _SC_THREAD_ROBUST_PRIO_PROTECT 248
+#define _SC_MINSIGSTKSZ 249
+#define _SC_SIGSTKSZ 250
 
 #define _CS_PATH       0
 #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS     1
diff --git a/runtime.cc b/runtime.cc
--- a/runtime.cc
+++ b/runtime.cc
@@ -379,6 +379,8 @@ long sysconf(int name)
     case _SC_THREAD_SAFE_FUNCTIONS: return 1;
     case _SC_GETGR_R_SIZE_MAX: return 1;
     case _SC_OPEN_MAX: return FDMAX;
+    case _SC_MINSIGSTKSZ: return MINSIGSTKSZ;
+    case _SC_SIGSTKSZ: return SIGSTKSZ;
     default:
         debug(fmt("sysconf(): stubbed for parameter %1%\n") % name);
         errno = EINVAL;

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/00000000000057e13b05deeb411d%40google.com.

Reply via email to