{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1749447464,
"reponame":"openssl",
"desc":"OpenSSL",
"owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/openssl",
"f":3,
"items": [
{"schema":"libjg2-1",
"cid":"23d1a21406743adb012e523a0c671a7d",
"commit": {"type":"commit",
"time": 1518167445,
"time_ofs": 60,
"oid_tree": { "oid": "715eb6e077631e1890af8a096d2c3b62e700124b", "alias": []},
"oid":{ "oid": "4cd58771d8387c6bfbd0fd9936aaeb3ba63a6fe6", "alias": []},
"msg": "Fix glibc version detection. Simplify Posix timer detection.",
"sig_commit": { "git_time": { "time": 1518167445, "offset": 60 }, "name": "Richard Levitte", "email": "levitte@openssl.org", "md5": "b737120f0642a6a5c30c6291e6170c77" },
"sig_author": { "git_time": { "time": 1518051870, "offset": 600 }, "name": "Pauli", "email": "paul.dale@oracle.com", "md5": "4616f8cb80bd6ce4dab75d05e07cd125" }},
"body": "Fix glibc version detection.\nSimplify Posix timer detection.\n\nReviewed-by: Richard Levitte \u003clevitte@openssl.org\u003e\n(Merged from https://github.com/openssl/openssl/pull/5279)\n"
,
"diff": "diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c\nindex 69c3c79..faec18d 100644\n--- a/crypto/rand/rand_lib.c\n+++ b/crypto/rand/rand_lib.c\n@@ -25,6 +25,39 @@\n /* Macro to convert two thirty two bit values into a sixty four bit one */\n #define TWO32TO64(a, b) ((((uint64_t)(a)) \u003c\u003c 32) + (b))\n \n+/*\n+ * Check for the existence and support of POSIX timers. The standard\n+ * says that the _POSIX_TIMERS macro will have a positive value if they\n+ * are available.\n+ *\n+ * However, we want an additional constraint: that the timer support does\n+ * not require an extra library dependency. Early versions of glibc\n+ * require -lrt to be specified on the link line to access the timers,\n+ * so this needs to be checked for.\n+ *\n+ * It is worse because some libraries define __GLIBC__ but don't\n+ * support the version testing macro (e.g. uClibc). This means\n+ * an extra check is needed.\n+ *\n+ * The final condition is:\n+ * \u0022have posix timers and either not glibc or glibc without -lrt\u0022\n+ *\n+ * The nested #if sequences are required to avoid using a parameterised\n+ * macro that might be undefined.\n+ */\n+#undef OSSL_POSIX_TIMER_OKAY\n+#if defined(_POSIX_TIMERS) \u0026\u0026 _POSIX_TIMERS \u003e 0\n+# if defined(__GLIBC__)\n+# if defined(__GLIBC_PREREQ)\n+# if __GLIBC_PREREQ(2, 17)\n+# define OSSL_POSIX_TIMER_OKAY\n+# endif\n+# endif\n+# else\n+# define OSSL_POSIX_TIMER_OKAY\n+# endif\n+#endif\n+\n #ifndef OPENSSL_NO_ENGINE\n /* non-NULL if default_RAND_meth is ENGINE-provided */\n static ENGINE *funct_ref;\n@@ -228,11 +261,7 @@ static uint64_t get_timer_bits(void)\n }\n #else\n \n-# if defined(_POSIX_C_SOURCE) \u005c\n- \u0026\u0026 defined(_POSIX_TIMERS) \u005c\n- \u0026\u0026 _POSIX_C_SOURCE \u003e\u003d 199309L \u005c\n- \u0026\u0026 (!defined(__GLIBC__) \u005c\n- || (defined(__GLIBC_PREREQ) \u0026\u0026 __GLIBC_PREREQ(2, 17)))\n+#if defined(OSSL_POSIX_TIMER_OKAY)\n {\n struct timespec ts;\n clockid_t cid;\n","s":{"c":1749447464,"u": 36111}}
],"g": 37617,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}