On Tue, 2016-02-16 at 12:49 +0100, Christoph Berg wrote:
> Control: tags -1 = moreinfo
> 
> Re: Svante Signell 2015-11-02 <1446486254.26488.161.ca...@gmail.com>
> > Source: libqb
> > Version: 0.17.2.real-4
> > Severity: normal
> > 
> Hi Svante,
> 
> thanks for the patch! Unfortunately I can't apply it:
...
> Would you be able to fix that?

Hello,

Attached is an updated patch together with an updated symbols file, generated
with gcc-5.3.1-5.

Thanks!
Index: libqb-0.17.2.real/configure.ac
===================================================================
--- libqb-0.17.2.real.orig/configure.ac
+++ libqb-0.17.2.real/configure.ac
@@ -202,10 +202,26 @@ AC_CHECK_FUNCS([alarm clock_gettime ftru
 		pthread_spin_lock pthread_setschedparam \
                 pthread_mutexattr_setpshared \
                 pthread_condattr_setpshared \
-		sem_timedwait semtimedop \
+		semtimedop \
 		sched_get_priority_max sched_setscheduler \
 		getpeerucred getpeereid])
 
+		AC_MSG_CHECKING(for a working sem_timedwait)
+		LDFLAGS=-lpthread
+		AC_RUN_IFELSE([AC_LANG_PROGRAM(
+[[#include <semaphore.h>]],
+[[sem_t sem;
+struct timespec ts;
+if (sem_init(&sem, 0, 0) == -1) return -1;
+if(sem_timedwait(&sem, &ts)==-1) return -1;]])],
+			  [
+			    AC_MSG_RESULT([yes])
+			    AC_DEFINE_UNQUOTED([HAVE_SEM_TIMEDWAIT], [1], [Define to 1 if sem_timedwait works])
+			  ],
+			  [
+			    AC_MSG_RESULT([no])
+			  ])
+
 AM_CONDITIONAL(HAVE_SEM_TIMEDWAIT,
 	       [test "x$ac_cv_func_sem_timedwait" = xyes])
 AM_CONDITIONAL(HAVE_EPOLL,
@@ -341,6 +357,11 @@ case "$host_os" in
 		CP=rsync
 		AC_MSG_RESULT([Solaris])
 	;;
+	*gnu*)
+		AC_DEFINE_UNQUOTED([QB_GNU], [1],
+				   [Compiling for GNU/Hurd platform])
+		AC_MSG_RESULT([GNU])
+	;;
 	*)
 		AC_MSG_ERROR([Unsupported OS? hmmmm])
 	;;
Index: libqb-0.17.2.real/lib/log_thread.c
===================================================================
--- libqb-0.17.2.real.orig/lib/log_thread.c
+++ libqb-0.17.2.real/lib/log_thread.c
@@ -164,7 +164,11 @@ qb_log_thread_start(void)
 
 	if (logt_sched_param_queued) {
 		res = qb_log_thread_priority_set(logt_sched_policy,
+#if defined(HAVE_PTHREAD_SETSCHEDPARAM) && defined(HAVE_SCHED_GET_PRIORITY_MAX)
 		                                 logt_sched_param.sched_priority);
+#else
+		                                 0);
+#endif
 		if (res != 0) {
 			goto cleanup_pthread;
 		}
Index: libqb-0.17.2.real/lib/ipc_socket.c
===================================================================
--- libqb-0.17.2.real.orig/lib/ipc_socket.c
+++ libqb-0.17.2.real/lib/ipc_socket.c
@@ -79,7 +79,7 @@ qb_ipc_dgram_sock_setup(const char *base
 	}
 	snprintf(sock_path, PATH_MAX, "%s-%s", base_name, service_name);
 	set_sock_addr(&local_address, sock_path);
-#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
+#if !(defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU))
 	res = unlink(local_address.sun_path);
 #endif
 	res = bind(request_fd, (struct sockaddr *)&local_address,
@@ -287,7 +287,7 @@ _finish_connecting(struct qb_ipc_one_way
 static void
 qb_ipcc_us_disconnect(struct qb_ipcc_connection *c)
 {
-#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
+#if !(defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU))
   struct sockaddr_un un_addr;
   socklen_t un_addr_len = sizeof(struct sockaddr_un);
   char *base_name;
@@ -298,7 +298,7 @@ qb_ipcc_us_disconnect(struct qb_ipcc_con
 	munmap(c->request.u.us.shared_data, SHM_CONTROL_SIZE);
 	unlink(c->request.u.us.shared_file_name);
 
-#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
+#if !(defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU))
     if (getsockname(c->response.u.us.sock, (struct sockaddr *)&un_addr, &un_addr_len) == 0) {
       length = strlen(un_addr.sun_path);
       base_name = strndup(un_addr.sun_path,length-9);
@@ -422,7 +422,7 @@ retry_peek:
 
 		if (errno != EAGAIN) {
 			final_rc = -errno;
-#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
+#if !(defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU))
 			if (errno == ECONNRESET || errno == EPIPE) {
 				final_rc = -ENOTCONN;
 			}
@@ -657,7 +657,7 @@ _sock_rm_from_mainloop(struct qb_ipcs_co
 static void
 qb_ipcs_us_disconnect(struct qb_ipcs_connection *c)
 {
-#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
+#if !(defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU))
 	struct sockaddr_un un_addr;
 	socklen_t un_addr_len = sizeof(struct sockaddr_un);
 	char *base_name;
@@ -670,7 +670,7 @@ qb_ipcs_us_disconnect(struct qb_ipcs_con
 	    c->state == QB_IPCS_CONNECTION_ACTIVE) {
 		_sock_rm_from_mainloop(c);
 
-#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
+#if !(defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU))
 		if (getsockname(c->response.u.us.sock, (struct sockaddr *)&un_addr, &un_addr_len) == 0) {
 			length = strlen(un_addr.sun_path);
 			base_name = strndup(un_addr.sun_path,length-8);
Index: libqb-0.17.2.real/lib/unix.c
===================================================================
--- libqb-0.17.2.real.orig/lib/unix.c
+++ libqb-0.17.2.real/lib/unix.c
@@ -80,7 +80,7 @@ qb_sys_mmap_file_open(char *path, const
 	if (is_absolute) {
 		(void)strlcpy(path, file, PATH_MAX);
 	} else {
-#if defined(QB_LINUX) || defined(QB_CYGWIN)
+#if defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU)
 		snprintf(path, PATH_MAX, "/dev/shm/%s", file);
 #else
 		snprintf(path, PATH_MAX, LOCALSTATEDIR "/run/%s", file);
Index: libqb-0.17.2.real/lib/ipc_setup.c
===================================================================
--- libqb-0.17.2.real.orig/lib/ipc_setup.c
+++ libqb-0.17.2.real/lib/ipc_setup.c
@@ -394,7 +394,7 @@ qb_ipcs_us_publish(struct qb_ipcs_servic
 #endif
 
 	qb_util_log(LOG_INFO, "server name: %s", s->name);
-#if defined(QB_LINUX) || defined(QB_CYGWIN)
+#if defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU)
 	snprintf(un_addr.sun_path + 1, UNIX_PATH_MAX - 1, "%s", s->name);
 #else
 	{
@@ -426,7 +426,7 @@ qb_ipcs_us_publish(struct qb_ipcs_servic
 	 * Allow everyone to write to the socket since the IPC layer handles
 	 * security automatically
 	 */
-#if !defined(QB_LINUX) && !defined(QB_CYGWIN)
+#if !defined(QB_LINUX) && !defined(QB_CYGWIN) && !defined(QB_GNU)
 	res = chmod(un_addr.sun_path, S_IRWXU | S_IRWXG | S_IRWXO);
 #endif
 #ifdef SO_PASSCRED
libqb.so.0 libqb0 #MINVER#
* Build-Depends-Package: libqb-dev
 __start___verbose@Base 0.11.1
 __stop___verbose@Base 0.11.1
 facilitynames@Base 0.11.1
 qb_array_create@Base 0.11.1
 qb_array_create_2@Base 0.11.1
 qb_array_elems_per_bin_get@Base 0.11.1
 qb_array_free@Base 0.11.1
 qb_array_grow@Base 0.11.1
 qb_array_index@Base 0.11.1
 qb_array_new_bin_cb_set@Base 0.14.3
 qb_array_num_bins_get@Base 0.11.1
 qb_atomic_init@Base 0.11.1
 qb_atomic_int_add@Base 0.11.1
 qb_atomic_int_compare_and_exchange@Base 0.11.1
 qb_atomic_int_exchange_and_add@Base 0.11.1
 qb_atomic_int_get@Base 0.11.1
 qb_atomic_int_set@Base 0.11.1
 qb_atomic_pointer_compare_and_exchange@Base 0.11.1
 qb_atomic_pointer_get@Base 0.11.1
 qb_atomic_pointer_set@Base 0.11.1
 qb_hashtable_create@Base 0.11.1
 qb_hdb_base_convert@Base 0.11.1
 qb_hdb_create@Base 0.11.1
 qb_hdb_destroy@Base 0.11.1
 qb_hdb_handle_create@Base 0.11.1
 qb_hdb_handle_destroy@Base 0.11.1
 qb_hdb_handle_get@Base 0.11.1
 qb_hdb_handle_get_always@Base 0.11.1
 qb_hdb_handle_put@Base 0.11.1
 qb_hdb_handle_refcount_get@Base 0.11.1
 qb_hdb_iterator_next@Base 0.11.1
 qb_hdb_iterator_reset@Base 0.11.1
 qb_hdb_nocheck_convert@Base 0.11.1
 qb_ipc_us_ready@Base 0.14.2
 qb_ipc_us_recv@Base 0.11.1
 qb_ipc_us_send@Base 0.11.1
 qb_ipc_us_sock_error_is_disconnected@Base 0.14.2
 qb_ipcc_connect@Base 0.11.1
 qb_ipcc_context_get@Base 0.11.1
 qb_ipcc_context_set@Base 0.11.1
 qb_ipcc_disconnect@Base 0.11.1
 qb_ipcc_event_recv@Base 0.11.1
 qb_ipcc_fc_enable_max_set@Base 0.11.1
 qb_ipcc_fd_get@Base 0.11.1
 qb_ipcc_get_buffer_size@Base 0.17.0
 qb_ipcc_is_connected@Base 0.14.2
 qb_ipcc_recv@Base 0.11.1
 qb_ipcc_send@Base 0.11.1
 qb_ipcc_sendv@Base 0.11.1
 qb_ipcc_sendv_recv@Base 0.11.1
 qb_ipcc_shm_connect@Base 0.11.1
 qb_ipcc_us_connect@Base 0.11.1
 qb_ipcc_us_setup_connect@Base 0.11.1
 qb_ipcc_us_sock_close@Base 0.11.1
 qb_ipcc_verify_dgram_max_msg_size@Base 0.16.0
 qb_ipcs_connection_alloc@Base 0.11.1
 qb_ipcs_connection_auth_set@Base 0.14.2
 qb_ipcs_connection_first_get@Base 0.11.1
 qb_ipcs_connection_get_buffer_size@Base 0.17.0
 qb_ipcs_connection_next_get@Base 0.11.1
 qb_ipcs_connection_ref@Base 0.11.1
 qb_ipcs_connection_service_context_get@Base 0.16.0
 qb_ipcs_connection_stats_get@Base 0.11.1
 qb_ipcs_connection_stats_get_2@Base 0.14.2
 qb_ipcs_connection_unref@Base 0.11.1
 qb_ipcs_context_get@Base 0.11.1
 qb_ipcs_context_set@Base 0.11.1
 qb_ipcs_create@Base 0.13.0
 qb_ipcs_destroy@Base 0.11.1
 qb_ipcs_disconnect@Base 0.11.1
 qb_ipcs_dispatch_connection_request@Base 0.11.1
 qb_ipcs_enforce_buffer_size@Base 0.17.0
 qb_ipcs_event_send@Base 0.11.1
 qb_ipcs_event_sendv@Base 0.11.1
 qb_ipcs_poll_handlers_set@Base 0.11.1
 qb_ipcs_ref@Base 0.11.1
 qb_ipcs_request_rate_limit@Base 0.11.1
 qb_ipcs_response_send@Base 0.11.1
 qb_ipcs_response_sendv@Base 0.11.1
 qb_ipcs_run@Base 0.11.1
 qb_ipcs_service_context_get@Base 0.16.0
 qb_ipcs_service_context_set@Base 0.16.0
 qb_ipcs_service_id_get@Base 0.11.1
 qb_ipcs_shm_init@Base 0.11.1
 qb_ipcs_stats_get@Base 0.11.1
 qb_ipcs_unref@Base 0.11.1
 qb_ipcs_us_init@Base 0.11.1
 qb_ipcs_us_publish@Base 0.11.1
 qb_ipcs_us_withdraw@Base 0.11.1
 qb_log_blackbox_open@Base 0.11.1
 qb_log_blackbox_print_from_file@Base 0.11.1
 qb_log_blackbox_write_to_file@Base 0.11.1
 qb_log_callsite_get@Base 0.11.1
 qb_log_callsites_dump@Base 0.11.1
 qb_log_callsites_register@Base 0.11.1
 qb_log_ctl@Base 0.14.0
 qb_log_custom_close@Base 0.11.1
 qb_log_custom_open@Base 0.11.1
 qb_log_dcs_fini@Base 0.11.1
 qb_log_dcs_get@Base 0.11.1
 qb_log_dcs_init@Base 0.11.1
 qb_log_facility2int@Base 0.11.1
 qb_log_facility2str@Base 0.11.1
 qb_log_file_close@Base 0.11.1
 qb_log_file_open@Base 0.11.1
 qb_log_filter_ctl2@Base 0.17.1
 qb_log_filter_ctl@Base 0.17.1
 qb_log_filter_fn_set@Base 0.11.1
 qb_log_fini@Base 0.11.1
 qb_log_format_fini@Base 0.14.4
 qb_log_format_init@Base 0.14.4
 qb_log_format_set@Base 0.11.1
 qb_log_from_external_source@Base 0.11.1
 qb_log_from_external_source_va@Base 0.11.1
 qb_log_init@Base 0.11.1
 qb_log_priority2str@Base 0.14.2
 qb_log_real_@Base 0.11.1
 qb_log_real_va_@Base 0.11.1
 qb_log_stderr_open@Base 0.11.1
 qb_log_syslog_open@Base 0.11.1
 qb_log_tags_stringify_fn_set@Base 0.11.1
 qb_log_target_alloc@Base 0.11.1
 qb_log_target_format@Base 0.11.1
 qb_log_target_format_static@Base 0.11.1
 qb_log_target_free@Base 0.11.1
 qb_log_target_get@Base 0.11.1
 qb_log_target_user_data_get@Base 0.11.1
 qb_log_target_user_data_set@Base 0.11.1
 qb_log_thread_log_post@Base 0.11.1
 qb_log_thread_log_write@Base 0.11.1
 qb_log_thread_priority_set@Base 0.11.1
 qb_log_thread_start@Base 0.11.1
 qb_log_thread_stop@Base 0.11.1
 qb_loop_create@Base 0.11.1
 qb_loop_default_get@Base 0.11.1
 qb_loop_destroy@Base 0.11.1
 qb_loop_job_add@Base 0.11.1
 qb_loop_job_del@Base 0.11.1
 qb_loop_jobs_create@Base 0.11.1
 qb_loop_jobs_destroy@Base 0.11.1
 qb_loop_level_item_add@Base 0.11.1
 qb_loop_level_item_del@Base 0.11.1
 qb_loop_poll_add@Base 0.11.1
 qb_loop_poll_create@Base 0.11.1
 qb_loop_poll_del@Base 0.11.1
 qb_loop_poll_destroy@Base 0.11.1
 qb_loop_poll_low_fds_event_set@Base 0.11.1
 qb_loop_poll_mod@Base 0.11.1
 qb_loop_run@Base 0.11.1
 qb_loop_signal_add@Base 0.11.1
 qb_loop_signal_del@Base 0.11.1
 qb_loop_signal_mod@Base 0.11.1
 qb_loop_signals_create@Base 0.11.1
 qb_loop_signals_destroy@Base 0.11.1
 qb_loop_stop@Base 0.11.1
 qb_loop_timer_add@Base 0.11.1
 qb_loop_timer_create@Base 0.11.1
 qb_loop_timer_del@Base 0.11.1
 qb_loop_timer_destroy@Base 0.11.1
 qb_loop_timer_expire_time_get@Base 0.11.1
 qb_loop_timer_is_running@Base 0.11.1
 qb_loop_timer_msec_duration_to_expire@Base 0.11.1
 qb_map_count_get@Base 0.11.1
 qb_map_destroy@Base 0.11.1
 qb_map_foreach@Base 0.11.1
 qb_map_get@Base 0.11.1
 qb_map_iter_create@Base 0.11.1
 qb_map_iter_free@Base 0.11.1
 qb_map_iter_next@Base 0.11.1
 qb_map_notify_add@Base 0.11.1
 qb_map_notify_del@Base 0.11.1
 qb_map_notify_del_2@Base 0.11.1
 qb_map_pref_iter_create@Base 0.11.1
 qb_map_put@Base 0.11.1
 qb_map_rm@Base 0.11.1
 qb_poll_fds_usage_check_@Base 0.14.2
 qb_poll_init@Base 0.17.2.real-4.1
 qb_rb_chmod@Base 0.14.2
 qb_rb_chown@Base 0.11.1
 qb_rb_chunk_alloc@Base 0.11.1
 qb_rb_chunk_commit@Base 0.11.1
 qb_rb_chunk_peek@Base 0.11.1
 qb_rb_chunk_read@Base 0.11.1
 qb_rb_chunk_reclaim@Base 0.11.1
 qb_rb_chunk_write@Base 0.11.1
 qb_rb_chunks_used@Base 0.11.1
 qb_rb_close@Base 0.11.1
 qb_rb_create_from_file@Base 0.11.1
 qb_rb_force_close@Base 0.11.1
 qb_rb_name_get@Base 0.11.1
 qb_rb_open@Base 0.11.1
 qb_rb_open_2@Base 0.16.0
 qb_rb_refcount_get@Base 0.11.1
 qb_rb_sem_create@Base 0.11.1
 qb_rb_shared_user_data_get@Base 0.11.1
 qb_rb_space_free@Base 0.11.1
 qb_rb_space_used@Base 0.11.1
 qb_rb_write_to_file@Base 0.11.1
 qb_sigpipe_ctl@Base 0.16.0
 qb_skiplist_create@Base 0.11.1
 qb_socket_nosigpipe@Base 0.16.0
 qb_strerror_r@Base 0.11.1
 qb_sys_circular_mmap@Base 0.11.1
 qb_sys_fd_nonblock_cloexec_set@Base 0.11.1
 qb_sys_mmap_file_open@Base 0.11.1
 qb_thread_lock@Base 0.11.1
 qb_thread_lock_create@Base 0.11.1
 qb_thread_lock_destroy@Base 0.11.1
 qb_thread_trylock@Base 0.11.1
 qb_thread_unlock@Base 0.11.1
 qb_timespec_add_ms@Base 0.11.1
 qb_trie_create@Base 0.11.1
 qb_trie_dump@Base 0.11.1
 qb_util_nano_current_get@Base 0.11.1
 qb_util_nano_from_epoch_get@Base 0.11.1
 qb_util_nano_monotonic_hz@Base 0.11.1
 qb_util_set_log_function@Base 0.11.1
 qb_util_stopwatch_create@Base 0.11.1
 qb_util_stopwatch_free@Base 0.11.1
 qb_util_stopwatch_sec_elapsed_get@Base 0.11.1
 qb_util_stopwatch_split@Base 0.11.1
 qb_util_stopwatch_split_ctl@Base 0.11.1
 qb_util_stopwatch_split_last@Base 0.11.1
 qb_util_stopwatch_start@Base 0.11.1
 qb_util_stopwatch_stop@Base 0.11.1
 qb_util_stopwatch_time_split_get@Base 0.11.1
 qb_util_stopwatch_us_elapsed_get@Base 0.11.1
 qb_util_timespec_from_epoch_get@Base 0.11.1
 qb_vsnprintf_deserialize@Base 0.11.1
 qb_vsnprintf_serialize@Base 0.14.2
 rpl_sem_destroy@Base 0.17.2.real-4.1
 rpl_sem_getvalue@Base 0.17.2.real-4.1
 rpl_sem_init@Base 0.17.2.real-4.1
 rpl_sem_post@Base 0.17.2.real-4.1
 rpl_sem_timedwait@Base 0.17.2.real-4.1
 rpl_sem_trywait@Base 0.17.2.real-4.1
 rpl_sem_wait@Base 0.17.2.real-4.1
 strlcat@Base 0.11.1
 strlcpy@Base 0.11.1

Reply via email to