+---
+* [Bug 3456] Use uintptr_t rather than size_t to store an integer in a pointer
+ - According to Brooks Davis, there was only one location <perlinger@ntp.org>
+
---
(4.2.8p11) 2018/02/27 Released by Harlan Stenn <stenn@ntp.org>
# define THREAD_MAXSTACKSIZE THREAD_MINSTACKSIZE
#endif
+/* need a good integer to store a pointer... */
+#ifndef UINTPTR_T
+# if defined(UINTPTR_MAX)
+# define UINTPTR_T uintptr_t
+# elif defined(UINT_PTR)
+# define UINTPTR_T UINT_PTR
+# else
+# define UINTPTR_T size_t
+# endif
+#endif
+
#ifdef SYS_WINNT
#else
-# define thread_exit(c) pthread_exit((void*)(size_t)(c))
+# define thread_exit(c) pthread_exit((void*)(UINTPTR_T)(c))
# define tickle_sem sem_post
void * blocking_thread(void *);
static void block_thread_signals(sigset_t *);
if (empty)
{
# ifdef WORK_PIPE
- write(c->resp_write_pipe, "", 1);
+ if (1 != write(c->resp_write_pipe, "", 1))
+ msyslog(LOG_WARNING, "async resolver: %s",
+ "failed to notify main thread!");
# else
tickle_sem(c->responses_pending);
# endif