/** \file gccmacro.h Defines some macros for GCC extensions */
#ifdef __GNUC__
/** \file gccmacro.h Defines some macros for GCC extensions */
#ifdef __GNUC__
#define AVAHI_GCC_SENTINEL __attribute__ ((sentinel))
#define AVAHI_GCC_SENTINEL __attribute__ ((sentinel))
+#endif
+#endif
+
+#ifndef AVAHI_GCC_SENTINEL
/** Macro for usage of GCC's sentinel compilation warnings */
#define AVAHI_GCC_SENTINEL
#endif
/** Macro for usage of GCC's sentinel compilation warnings */
#define AVAHI_GCC_SENTINEL
#endif
avahi_server_free(server);
avahi_simple_poll_free(simple_poll);
avahi_server_free(server);
avahi_simple_poll_free(simple_poll);
static void scan_interface_callback(AvahiInterfaceMonitor *m, AvahiInterface *i, void* userdata) {
AvahiSRecordBrowser *b = userdata;
static void scan_interface_callback(AvahiInterfaceMonitor *m, AvahiInterface *i, void* userdata) {
AvahiSRecordBrowser *b = userdata;
- struct cbdata cbdata = { b, i };
+ struct cbdata cbdata;
+
+ cbdata.record_browser = b;
+ cbdata.interface = i;
}
avahi_ini_file_free(f);
}
avahi_ini_file_free(f);
- static const struct option const long_options[] = {
+ static const struct option long_options[] = {
{ "help", no_argument, NULL, 'h' },
{ "daemonize", no_argument, NULL, 'D' },
{ "kill", no_argument, NULL, 'k' },
{ "help", no_argument, NULL, 'h' },
{ "daemonize", no_argument, NULL, 'D' },
{ "kill", no_argument, NULL, 'k' },
static void log_function(AvahiLogLevel level, const char *txt) {
static void log_function(AvahiLogLevel level, const char *txt) {
- static const int const log_level_map[] = {
+ static const int log_level_map[] = {
LOG_ERR,
LOG_WARNING,
LOG_NOTICE,
LOG_ERR,
LOG_WARNING,
LOG_NOTICE,
static int parse_command_line(int argc, char *argv[]) {
int c;
static int parse_command_line(int argc, char *argv[]) {
int c;
- static const struct option const long_options[] = {
+ static const struct option long_options[] = {
{ "help", no_argument, NULL, 'h' },
{ "daemonize", no_argument, NULL, 'D' },
{ "kill", no_argument, NULL, 'k' },
{ "help", no_argument, NULL, 'h' },
{ "daemonize", no_argument, NULL, 'D' },
{ "kill", no_argument, NULL, 'k' },