summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac5
-rw-r--r--main.c8
-rw-r--r--playlist.c5
-rw-r--r--plugins.c2
-rw-r--r--plugins/artwork/albumartorg.c3
-rw-r--r--plugins/artwork/artwork.c8
-rw-r--r--plugins/artwork/lastfm.c3
-rw-r--r--plugins/mms/libmms/bswap.h11
-rw-r--r--plugins/shellexec/shellexec.c4
-rw-r--r--plugins/sndfile/sndfile.c3
-rw-r--r--plugins/vorbis/vorbis.c6
-rw-r--r--plugins/wildmidi/src/wildmidi_lib.c5
-rw-r--r--utf8.c6
13 files changed, 57 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 2f15a13b..64874ab7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,6 +114,11 @@ fi
dnl check for libdl
AC_CHECK_LIB([dl], [main], [HAVE_DL=yes;DL_LIBS="-ldl";AC_SUBST(DL_LIBS)])
+dnl check libsocket (OpenIndiana)
+AC_CHECK_LIB([socket], [main], [HAVE_SOCKET=yes;DL_LIBS="-lsocket";AC_SUBST(DL_LIBS)])
+dnl check for seperate alloca.h (OpenIndiana)
+AC_CHECK_HEADER([alloca.h],[],[alloca.h not found.])
+
if test "x$enable_portable" != "xno" && test "x$enable_staticlink" != "xno" ; then
AC_DEFINE_UNQUOTED([PORTABLE], [1], [Define if building portable version])
PORTABLE=yes
diff --git a/main.c b/main.c
index 2a4d220e..db8205fa 100644
--- a/main.c
+++ b/main.c
@@ -15,6 +15,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <stdio.h>
#include <stdint.h>
#include <string.h>
@@ -26,7 +29,7 @@
#include <sys/prctl.h>
#endif
#ifndef __linux__
-#define _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 1
#endif
#include <limits.h>
#include <errno.h>
@@ -41,9 +44,6 @@
#ifdef __linux__
#include <execinfo.h>
#endif
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
#include <unistd.h>
#include "gettext.h"
#include "playlist.h"
diff --git a/playlist.c b/playlist.c
index 390cd133..9aee5540 100644
--- a/playlist.c
+++ b/playlist.c
@@ -18,6 +18,9 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#endif
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
@@ -31,7 +34,7 @@
#include <time.h>
#include <sys/time.h>
#ifndef __linux__
-#define _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 1
#endif
#include <limits.h>
#include <errno.h>
diff --git a/plugins.c b/plugins.c
index 53436f9a..38abace1 100644
--- a/plugins.c
+++ b/plugins.c
@@ -24,7 +24,7 @@
//#include <alloca.h>
#include <string.h>
#ifndef __linux__
-#define _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 1
#endif
#include <limits.h>
#ifdef HAVE_CONFIG_H
diff --git a/plugins/artwork/albumartorg.c b/plugins/artwork/albumartorg.c
index ada7179f..51ca54cb 100644
--- a/plugins/artwork/albumartorg.c
+++ b/plugins/artwork/albumartorg.c
@@ -16,6 +16,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --git a/plugins/artwork/artwork.c b/plugins/artwork/artwork.c
index c2a8b766..7f56b870 100644
--- a/plugins/artwork/artwork.c
+++ b/plugins/artwork/artwork.c
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -721,6 +724,11 @@ static const char *filter_custom_mask = NULL;
static int
filter_custom (const struct dirent *f)
{
+// FNM_CASEFOLD is not defined on solaris. On other platforms it is.
+// It should be safe to define it as FNM_INGORECASE if it isn't defined.
+#ifndef FNM_CASEFOLD
+#define FNM_CASEFOLD FNM_IGNORECASE
+#endif
if (!fnmatch (filter_custom_mask, f->d_name, FNM_CASEFOLD)) {
return 1;
}
diff --git a/plugins/artwork/lastfm.c b/plugins/artwork/lastfm.c
index 2e78fd87..91972c8a 100644
--- a/plugins/artwork/lastfm.c
+++ b/plugins/artwork/lastfm.c
@@ -1,3 +1,6 @@
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/plugins/mms/libmms/bswap.h b/plugins/mms/libmms/bswap.h
index 6a6e1d10..7fe6db62 100644
--- a/plugins/mms/libmms/bswap.h
+++ b/plugins/mms/libmms/bswap.h
@@ -271,6 +271,17 @@
#define GINT16_TO_LE(val) (val)
#endif
+/* If this is not defined, we are on Solaris */
+#ifndef u_int16_t
+#define u_int16_t uint16_t
+#endif
+#ifndef u_int32_t
+#define u_int32_t uint32_t
+#endif
+#ifndef u_int64_t
+#define u_int64_t uint64_t
+#endif
+
#define LE_16(val) (GINT16_FROM_LE (*((u_int16_t*)(val))))
#define BE_16(val) (GINT16_FROM_BE (*((u_int16_t*)(val))))
#define LE_32(val) (GINT32_FROM_LE (*((u_int32_t*)(val))))
diff --git a/plugins/shellexec/shellexec.c b/plugins/shellexec/shellexec.c
index 8ecf223e..76d31e34 100644
--- a/plugins/shellexec/shellexec.c
+++ b/plugins/shellexec/shellexec.c
@@ -37,7 +37,9 @@
remote - command allowed only for non-local files
disabled - ignore command
*/
-
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/plugins/sndfile/sndfile.c b/plugins/sndfile/sndfile.c
index bca91bab..eae39b86 100644
--- a/plugins/sndfile/sndfile.c
+++ b/plugins/sndfile/sndfile.c
@@ -16,6 +16,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#ifndef __linux__
#define _LARGEFILE64_SOURCE
#endif
diff --git a/plugins/vorbis/vorbis.c b/plugins/vorbis/vorbis.c
index c85a0c63..f12123ee 100644
--- a/plugins/vorbis/vorbis.c
+++ b/plugins/vorbis/vorbis.c
@@ -15,6 +15,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <vorbis/codec.h>
#include <vorbis/vorbisfile.h>
#include <string.h>
@@ -23,9 +26,6 @@
#include <limits.h>
#include <unistd.h>
#include <math.h>
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
#include "../../deadbeef.h"
#include "vcedit.h"
diff --git a/plugins/wildmidi/src/wildmidi_lib.c b/plugins/wildmidi/src/wildmidi_lib.c
index 97912c50..66a2ca4a 100644
--- a/plugins/wildmidi/src/wildmidi_lib.c
+++ b/plugins/wildmidi/src/wildmidi_lib.c
@@ -137,7 +137,9 @@
========================================
*/
-
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
@@ -155,7 +157,6 @@
#ifdef _WIN32
# include <windows.h>
#endif
-#include "config.h"
#include "wildmidi_lib.h"
/*
diff --git a/utf8.c b/utf8.c
index 4efb2ea6..6165742e 100644
--- a/utf8.c
+++ b/utf8.c
@@ -19,6 +19,12 @@
by Jeff Bezanson
placed in the public domain Fall 2005
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>