Skip to content

Commit 09fd3a1

Browse files
committed
Add ifdefs for macos
Signed-off-by: Travis F. Collins <[email protected]>
1 parent 0ce16d2 commit 09fd3a1

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Diff for: dialogs.c

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
#include <stdlib.h>
1010
#include <stdbool.h>
1111
#include <string.h>
12+
#ifdef __APPLE__
13+
#include <strings.h>
14+
#endif
1215
#include <errno.h>
1316
#include <gtk/gtk.h>
1417
#include <gdk/gdkkeysyms.h>

Diff for: osc.c

+6
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,9 @@ void * plugin_dlsym(const char *name, const char *symbol)
884884
void *fcn;
885885
char *buf;
886886
#ifndef __MINGW__
887+
#ifndef __APPLE__
887888
Dl_info info;
889+
#endif
888890
#endif
889891

890892
for (node = plugin_list; node; node = g_slist_next(node)) {
@@ -897,8 +899,10 @@ void * plugin_dlsym(const char *name, const char *symbol)
897899
fprintf(stderr, "%s:%s(): found plugin %s, error looking up %s\n"
898900
"\t%s\n", __FILE__, __func__, name, symbol, buf);
899901
#ifndef __MINGW__
902+
#ifndef __APPLE__
900903
if (dladdr(__builtin_return_address(0), &info))
901904
fprintf(stderr, "\tcalled from %s:%s()\n", info.dli_fname, info.dli_sname);
905+
#endif
902906
#endif
903907
}
904908
return fcn;
@@ -907,8 +911,10 @@ void * plugin_dlsym(const char *name, const char *symbol)
907911

908912
fprintf(stderr, "%s:%s : No plugin with matching name %s\n", __FILE__, __func__, name);
909913
#ifndef __MINGW__
914+
#ifndef __APPLE__
910915
if (dladdr(__builtin_return_address(0), &info))
911916
fprintf(stderr, "\tcalled from %s:%s()\n", info.dli_fname, info.dli_sname);
917+
#endif
912918
#endif
913919
return NULL;
914920
}

Diff for: oscplot.c

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
#include <matio.h>
1919
#include <sys/time.h>
2020
#include <string.h>
21+
#ifdef __APPLE__
22+
#include <strings.h>
23+
#endif
2124
#include <sys/types.h>
2225
#include <dirent.h>
2326

0 commit comments

Comments
 (0)