Re: [PATCH] Check before making a reference to __start___verbose

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ACK

Angus Salkeld napsal(a):
Signed-off-by: Angus Salkeld<asalkeld@xxxxxxxxxx>
---
  include/corosync/logsys.h |    9 ++++++++-
  1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/include/corosync/logsys.h b/include/corosync/logsys.h
index cff12b3..e40153d 100644
--- a/include/corosync/logsys.h
+++ b/include/corosync/logsys.h
@@ -43,6 +43,7 @@
  #include<pthread.h>
  #include<limits.h>

+#include<qb/qbconfig.h>
  #include<qb/qblog.h>

  #ifdef __cplusplus
@@ -177,11 +178,17 @@ static void logsys_system_init (void)					\
  	}								\
  }

+#ifdef QB_HAVE_ATTRIBUTE_SECTION
+#define LOGSYS_DECLARE_SECTION assert(__start___verbose != __stop___verbose)
+#else
+#define LOGSYS_DECLARE_SECTION
+#endif
+
  #define LOGSYS_DECLARE_SUBSYS(subsys)					\
  __attribute__ ((constructor))						\
  static void logsys_subsys_init (void)					\
  {									\
-	assert(__start___verbose != __stop___verbose);			\
+	LOGSYS_DECLARE_SECTION;						\
  	logsys_subsys_id =						\
  		_logsys_subsys_create ((subsys), __FILE__);		\
  	if (logsys_subsys_id == -1) {					\

_______________________________________________
discuss mailing list
discuss@xxxxxxxxxxxx
http://lists.corosync.org/mailman/listinfo/discuss


[Index of Archives]     [Linux Clusters]     [Corosync Project]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [X.Org]

  Powered by Linux