Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jan 2017 19:26:22 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r432565 - head/databases/mysql-proxy/files
Message-ID:  <201701271926.v0RJQMfF048385@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Fri Jan 27 19:26:22 2017
New Revision: 432565
URL: https://svnweb.freebsd.org/changeset/ports/432565

Log:
  databases/mysql-proxy: unbreak with libevent >= 2.1
  
  chassis-mainloop.c:102:54: error: use of undeclared identifier '_EVENT_VERSION'
          if (0 != chassis_check_version(event_get_version(), _EVENT_VERSION)) {
                                                              ^
  chassis-mainloop.c:104:15: error: use of undeclared identifier '_EVENT_VERSION'
                                  G_STRLOC, _EVENT_VERSION, event_get_version());
                                            ^
  /usr/local/include/glib-2.0/glib/gmessages.h:161:32: note: expanded from macro 'g_critical'
                                 __VA_ARGS__)
                                 ^
  chassis-mainloop.c:119:37: error: use of undeclared identifier '_EVENT_VERSION'
          chas->event_hdr_version = g_strdup(_EVENT_VERSION);
                                             ^
  
  PR:		216527

Added:
  head/databases/mysql-proxy/files/patch-src_chassis-mainloop.c   (contents, props changed)

Added: head/databases/mysql-proxy/files/patch-src_chassis-mainloop.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mysql-proxy/files/patch-src_chassis-mainloop.c	Fri Jan 27 19:26:22 2017	(r432565)
@@ -0,0 +1,40 @@
+Switch away from deprecated libevent macros.
+
+--- src/chassis-mainloop.c.orig	2013-12-23 22:57:16 UTC
++++ src/chassis-mainloop.c
+@@ -99,9 +99,9 @@ int chassis_check_version(const char *li
+ chassis *chassis_new() {
+ 	chassis *chas;
+ 
+-	if (0 != chassis_check_version(event_get_version(), _EVENT_VERSION)) {
++	if (0 != chassis_check_version(event_get_version(), LIBEVENT_VERSION)) {
+ 		g_critical("%s: chassis is build against libevent %s, but now runs against %s",
+-				G_STRLOC, _EVENT_VERSION, event_get_version());
++				G_STRLOC, LIBEVENT_VERSION, event_get_version());
+ 		return NULL;
+ 	}
+ 
+@@ -116,7 +116,7 @@ chassis *chassis_new() {
+ 
+ 	chas->threads = chassis_event_threads_new();
+ 
+-	chas->event_hdr_version = g_strdup(_EVENT_VERSION);
++	chas->event_hdr_version = g_strdup(LIBEVENT_VERSION);
+ 
+ 	chas->shutdown_hooks = chassis_shutdown_hooks_new();
+ 
+@@ -225,10 +225,10 @@ static void event_log_use_glib(int libev
+ 
+ 	GLogLevelFlags glib_log_level = G_LOG_LEVEL_DEBUG;
+ 
+-	if (libevent_log_level == _EVENT_LOG_DEBUG) glib_log_level = G_LOG_LEVEL_DEBUG;
+-	else if (libevent_log_level == _EVENT_LOG_MSG) glib_log_level = G_LOG_LEVEL_MESSAGE;
+-	else if (libevent_log_level == _EVENT_LOG_WARN) glib_log_level = G_LOG_LEVEL_WARNING;
+-	else if (libevent_log_level == _EVENT_LOG_ERR) glib_log_level = G_LOG_LEVEL_CRITICAL;
++	if (libevent_log_level == EVENT_LOG_DEBUG) glib_log_level = G_LOG_LEVEL_DEBUG;
++	else if (libevent_log_level == EVENT_LOG_MSG) glib_log_level = G_LOG_LEVEL_MESSAGE;
++	else if (libevent_log_level == EVENT_LOG_WARN) glib_log_level = G_LOG_LEVEL_WARNING;
++	else if (libevent_log_level == EVENT_LOG_ERR) glib_log_level = G_LOG_LEVEL_CRITICAL;
+ 
+ 	g_log(G_LOG_DOMAIN, glib_log_level, "(libevent) %s", msg);
+ }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701271926.v0RJQMfF048385>