3 @@ -2630,6 +2630,17 @@ int main (int argc, char **argv)
4 struct sigaction sigchild_action;
5 setup_signals(&sig_handler_action, &sigchild_action);
8 + * Create and a thread attribute for the threads we spawn later on.
9 + * PTHREAD_CREATE_DETACHED means to create threads detached, i.e.
10 + * their termination cannot be synchronized through 'pthread_join'.
12 + pthread_attr_init(&thread_attr);
13 + pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);
15 + /* Create the TLS key for thread number. */
16 + pthread_key_create(&tls_key_threadnr, NULL);
18 motion_startup(1, argc, argv);
21 @@ -2648,17 +2659,6 @@ int main (int argc, char **argv)
22 if (cnt_list[0]->conf.setup_mode)
23 MOTION_LOG(NTC, TYPE_ALL, NO_ERRNO, "%s: Motion running in setup mode.");
26 - * Create and a thread attribute for the threads we spawn later on.
27 - * PTHREAD_CREATE_DETACHED means to create threads detached, i.e.
28 - * their termination cannot be synchronized through 'pthread_join'.
30 - pthread_attr_init(&thread_attr);
31 - pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_DETACHED);
33 - /* Create the TLS key for thread number. */
34 - pthread_key_create(&tls_key_threadnr, NULL);
44 /* strerror_r() XSI vs GNU */
45 -#if (defined(BSD)) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE)
46 +#if (defined(BSD)) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE) || (!defined(__GLIBC__))
47 #define XSI_STRERROR_R