diff --git a/Outputs/OpenGL/OpenGL.hpp b/Outputs/OpenGL/OpenGL.hpp index ad5fad91a..1cef48dda 100644 --- a/Outputs/OpenGL/OpenGL.hpp +++ b/Outputs/OpenGL/OpenGL.hpp @@ -23,6 +23,7 @@ #else #define GL_GLEXT_PROTOTYPES #include +#include #endif #ifndef NDEBUG diff --git a/Outputs/OpenGL/ScanTargetGLSLFragments.cpp b/Outputs/OpenGL/ScanTargetGLSLFragments.cpp index cf18e6c26..b888f3a3b 100644 --- a/Outputs/OpenGL/ScanTargetGLSLFragments.cpp +++ b/Outputs/OpenGL/ScanTargetGLSLFragments.cpp @@ -10,6 +10,10 @@ #include +#ifndef M_PI +#define M_PI 3.1415926f +#endif + using namespace Outputs::Display::OpenGL; // MARK: - State setup for compiled shaders. diff --git a/SignalProcessing/FIRFilter.cpp b/SignalProcessing/FIRFilter.cpp index 5281590d9..54bb6bf4b 100644 --- a/SignalProcessing/FIRFilter.cpp +++ b/SignalProcessing/FIRFilter.cpp @@ -9,6 +9,10 @@ #include "FIRFilter.hpp" #include +#ifndef M_PI +#define M_PI 3.1415926f +#endif + using namespace SignalProcessing; /* diff --git a/Storage/MassStorage/SCSI/Target.hpp b/Storage/MassStorage/SCSI/Target.hpp index 6683dd242..99bd5d9c2 100644 --- a/Storage/MassStorage/SCSI/Target.hpp +++ b/Storage/MassStorage/SCSI/Target.hpp @@ -279,7 +279,7 @@ struct Executor { auto copy_string = [] (uint8_t *destination, const char *source, size_t length) -> void { // Copy as much of the string as will fit, and pad with spaces. - uint8_t *end = reinterpret_cast(stpncpy(reinterpret_cast(destination), source, length)); + uint8_t *end = reinterpret_cast(strncpy(reinterpret_cast(destination), source, length)); while(end < destination + length) { *end = ' '; ++end;