Skip to content

Instantly share code, notes, and snippets.

@2bits
Created November 16, 2012 05:18
Show Gist options
  • Save 2bits/4084357 to your computer and use it in GitHub Desktop.
Save 2bits/4084357 to your computer and use it in GitHub Desktop.
mpg321-0.3.2 diff fixes building on OSX.
--- a/mpg321.h 2012-03-25 05:27:49.000000000 -0700
+++ b/mpg321.h 2012-11-15 20:54:28.000000000 -0800
@@ -290,7 +290,7 @@
/* Shared total decoded frames */
decoded_frames *Decoded_Frames;
-#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
+#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) || defined(__APPLE__)
/* */
#else
union semun {
--- a/network.c 2012-03-25 05:27:49.000000000 -0700
+++ b/network.c 2012-11-15 20:58:02.000000000 -0800
@@ -50,6 +50,13 @@
#define IFVERB if(options.opt & MPG321_VERBOSE_PLAY)
+/* The following defines are needed to emulate the Linux interface on
+ * BSD-based systems like FreeBSD and OS X */
+#if !defined(IPV6_ADD_MEMBERSHIP) && defined(IPV6_JOIN_GROUP)
+#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
+#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP
+#endif
+
int proxy_enable = 0;
char *proxy_server;
int auth_enable = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment