summary refs log tree commit diff
path: root/pkgs/applications/audio/monkeys-audio
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2017-08-25 13:37:36 +0200
committeraszlig <aszlig@redmoonstudios.org>2017-08-25 14:05:12 +0200
commita5386213ad17e6780db6afcd075e470c6a005c58 (patch)
treebc7fbdbe70a9ca2e0c0fb8b30b32a278412aed9f /pkgs/applications/audio/monkeys-audio
parent13ab95f7be107211b9c7621e802a176c7a60aad0 (diff)
downloadnixpkgs-a5386213ad17e6780db6afcd075e470c6a005c58.tar
nixpkgs-a5386213ad17e6780db6afcd075e470c6a005c58.tar.gz
nixpkgs-a5386213ad17e6780db6afcd075e470c6a005c58.tar.bz2
nixpkgs-a5386213ad17e6780db6afcd075e470c6a005c58.tar.lz
nixpkgs-a5386213ad17e6780db6afcd075e470c6a005c58.tar.xz
nixpkgs-a5386213ad17e6780db6afcd075e470c6a005c58.tar.zst
nixpkgs-a5386213ad17e6780db6afcd075e470c6a005c58.zip
monkeys-audio: Fix build against GCC 6.x
Regression introduced by 1ded0cb24c4cd6b456ff18b6162d2173cc6330fc.

The package defines macros for min() and max(), but those macros are
undefined by the inclusion of stdlib.h since GCC 6.x, so we need to
change tho order of inclusions to include stdlib.h *before* NoWindows.h.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/applications/audio/monkeys-audio')
-rw-r--r--pkgs/applications/audio/monkeys-audio/buildfix.diff32
1 files changed, 27 insertions, 5 deletions
diff --git a/pkgs/applications/audio/monkeys-audio/buildfix.diff b/pkgs/applications/audio/monkeys-audio/buildfix.diff
index 3c48f6ad828..9684e5bf8e4 100644
--- a/pkgs/applications/audio/monkeys-audio/buildfix.diff
+++ b/pkgs/applications/audio/monkeys-audio/buildfix.diff
@@ -1,7 +1,8 @@
-diff -ru monkeys-audio-3.99-u4-b5/src/MACLib/APELink.cpp monkeys-audio-3.99-u4-b5.patched/src/MACLib/APELink.cpp
---- monkeys-audio-3.99-u4-b5/src/MACLib/APELink.cpp	2006-06-01 11:00:57.000000000 +0200
-+++ monkeys-audio-3.99-u4-b5.patched/src/MACLib/APELink.cpp	2012-01-05 14:51:47.000000000 +0100
-@@ -63,10 +63,10 @@
+diff --git a/src/MACLib/APELink.cpp b/src/MACLib/APELink.cpp
+index d349f4b..b00ec83 100644
+--- a/src/MACLib/APELink.cpp
++++ b/src/MACLib/APELink.cpp
+@@ -63,10 +63,10 @@ void CAPELink::ParseData(const char * pData, const str_utf16 * pFilename)
      if (pData != NULL)
      {
          // parse out the information
@@ -16,7 +17,7 @@ diff -ru monkeys-audio-3.99-u4-b5/src/MACLib/APELink.cpp monkeys-audio-3.99-u4-b
  
          if (pHeader && pImageFile && pStartBlock && pFinishBlock)
          {
-@@ -81,7 +81,7 @@
+@@ -81,7 +81,7 @@ void CAPELink::ParseData(const char * pData, const str_utf16 * pFilename)
                  
                  // get the path
                  char cImageFile[MAX_PATH + 1]; int nIndex = 0;
@@ -25,3 +26,24 @@ diff -ru monkeys-audio-3.99-u4-b5/src/MACLib/APELink.cpp monkeys-audio-3.99-u4-b
                  while ((*pImageCharacter != 0) && (*pImageCharacter != '\r') && (*pImageCharacter != '\n'))
                      cImageFile[nIndex++] = *pImageCharacter++;
                  cImageFile[nIndex] = 0;
+diff --git a/src/Shared/All.h b/src/Shared/All.h
+index 328addc..7730e89 100644
+--- a/src/Shared/All.h
++++ b/src/Shared/All.h
+@@ -21,6 +21,8 @@ Global includes
+     #include <windows.h>
+ #endif
+ 
++#include <stdlib.h>
++
+ #ifdef _WIN32
+     #include <mmsystem.h>
+     #include <tchar.h>
+@@ -34,7 +36,6 @@ Global includes
+     #include "NoWindows.h"
+ #endif
+ 
+-#include <stdlib.h>
+ #include <memory.h>
+ #include <stdio.h>
+ #include <math.h>