Projects

Ticket #55: DSS-6.0.3-linux.patch

File DSS-6.0.3-linux.patch, 10.2 KB (added by bero@…, 3 years ago)

Fix

  • DarwinStreamingSrvr6.0.3-Source/APICommonCode/QTAccessFile.cpp

    old new  
    4646 
    4747 
    4848#include <grp.h> 
     49#ifdef __MacOSX__ 
    4950#include <membership.h> 
     51#endif 
    5052#include <pwd.h> 
    5153#include <signal.h> 
    5254#include <unistd.h> 
     
    613615 
    614616bool DSAccessFile::CheckGroupMembership(const char* inUsername, const char* inGroupName) 
    615617{    
     618#ifdef __MacOSX__ 
    616619        // In Tiger, group membership is painfully simple: we ask memberd for it! 
    617620        struct passwd   *user           = NULL; 
    618621        struct group    *group          = NULL; 
     
    641644        if ( mbr_check_membership(userID, groupID, &isMember) ) 
    642645                return false; 
    643646        return (bool)isMember; 
     647#else 
     648        struct group *group = getgrnam(inGroupName); 
     649        if(!group) 
     650                return false; 
     651        int i=0; 
     652        while(group->gr_mem[i]) 
     653                if(!strcasecmp(inUsername, group->gr_mem[i])) 
     654                        return true; 
     655        return false; 
     656#endif 
    644657} 
    645658 
    646659Bool16 DSAccessFile::ValidUser( char*userName, void* extraDataPtr) 
  • DarwinStreamingSrvr6.0.3-Source/CommonUtilitiesLib/OSHeaders.h

    old new  
    120120 
    121121     
    122122#elif __linux__ || __linuxppc__ || __FreeBSD__ 
     123 
     124    #include <stdint.h> 
    123125     
    124126    /* Defines */ 
    125127    #define _64BITARG_ "q" 
    126128    #define _S64BITARG_ "lld" 
    127129    #define _U64BITARG_ "llu" 
    128 #if __LP64__ 
     130    #if __LP64__ 
    129131        #define _S32BITARG_ "d" 
    130132        #define _U32BITARG_ "u" 
    131 #else 
     133        #define _SPOINTERSIZEARG_ _S64BITARG_ 
     134        #define _UPOINTERSIZEARG_ _U64BITARG_ 
     135    #else 
    132136        #define _S32BITARG_ "ld" 
    133137        #define _U32BITARG_ "lu" 
    134 #endif 
     138        #define _SPOINTERSIZEARG_ _S32BITARG_ 
     139        #define _UPOINTERSIZEARG_ _U32BITARG_ 
     140    #endif 
    135141 
    136142    /* paths */ 
    137143    #define kEOLString "\n" 
     
    146152    #define QT_TIME_TO_LOCAL_TIME   (-2082844800) 
    147153    #define QT_PATH_SEPARATOR       '/' 
    148154 
     155    #define kSInt16_Max (SInt16) SHRT_MAX 
     156    #define kUInt16_Max (UInt16) USHRT_MAX 
     157 
     158    #define kSInt32_Max (SInt32) LONG_MAX 
     159    #define kUInt32_Max (UInt32) ULONG_MAX 
     160 
     161    #define kSInt64_Max (SInt64) LONG_LONG_MAX 
     162    #define kUInt64_Max (UInt64) ULONG_LONG_MAX 
     163 
    149164    /* Typedefs */ 
    150165    typedef signed long         PointerSizedInt; 
    151166    typedef unsigned long       PointerSizedUInt; 
    152     typedef unsigned char       UInt8; 
    153     typedef signed char         SInt8; 
    154     typedef unsigned short      UInt16; 
    155     typedef signed short        SInt16; 
    156     typedef unsigned int        UInt32; 
    157     typedef signed int          SInt32; 
    158     typedef signed int int      SInt64; 
    159     typedef unsigned int int    UInt64; 
     167    typedef uint8_t             UInt8; 
     168    typedef int8_t              SInt8; 
     169    typedef uint16_t            UInt16; 
     170    typedef int16_t             SInt16; 
     171    typedef uint32_t            UInt32; 
     172    typedef int32_t             SInt32; 
     173    typedef int64_t             SInt64; 
     174    typedef uint64_t            UInt64; 
    160175    typedef float               Float32; 
    161176    typedef double              Float64; 
    162177    typedef UInt16              Bool16; 
  • DarwinStreamingSrvr6.0.3-Source/Makefile.POSIX

    old new  
    2121CCFLAGS += -IAPICommonCode 
    2222CCFLAGS += -IAPIModules/OSMemory_Modules 
    2323CCFLAGS += -IAPIModules/QTSSAccessLogModule 
     24CCFLAGS += -IAPIModules/QTSSDSAuthModule 
    2425CCFLAGS += -IAPIModules/QTSSFileModule 
    2526CCFLAGS += -IAPIModules/QTSSFlowControlModule 
    2627CCFLAGS += -IAPIModules/QTSSReflectorModule 
     
    7172                        Server.tproj/RTPBandwidthTracker.cpp \ 
    7273                        Server.tproj/RTPOverbufferWindow.cpp \ 
    7374                        Server.tproj/RTPSessionInterface.cpp\ 
     75                        Server.tproj/RTPSession3GPP.cpp \ 
    7476                        Server.tproj/RTPStream.cpp \ 
     77                        Server.tproj/RTPStream3gpp.cpp \ 
    7578                        Server.tproj/RTSPProtocol.cpp\ 
    7679                        Server.tproj/RTSPRequest.cpp \ 
     80                        Server.tproj/RTSPRequest3GPP.cpp \ 
    7781                        Server.tproj/RTSPRequestInterface.cpp\ 
    7882                        Server.tproj/RTSPRequestStream.cpp \ 
    7983                        Server.tproj/RTSPResponseStream.cpp\ 
    8084                        Server.tproj/RTSPSession.cpp \ 
     85                        Server.tproj/RTSPSession3GPP.cpp \ 
    8186                        Server.tproj/RTSPSessionInterface.cpp\ 
    8287                        Server.tproj/main.cpp \ 
    8388                        Server.tproj/RunServer.cpp \ 
     
    9297                        HTTPUtilitiesLib/HTTPProtocol.cpp \ 
    9398                        HTTPUtilitiesLib/HTTPRequest.cpp \ 
    9499                        RTCPUtilitiesLib/RTCPAPPPacket.cpp\ 
     100                        RTCPUtilitiesLib/RTCPAPPNADUPacket.cpp \ 
     101                        RTCPUtilitiesLib/RTCPAPPQTSSPacket.cpp \ 
    95102                        RTCPUtilitiesLib/RTCPPacket.cpp \ 
    96103                        RTCPUtilitiesLib/RTCPSRPacket.cpp\ 
    97104                        RTCPUtilitiesLib/RTCPAckPacket.cpp\ 
     
    102109                        APICommonCode/SDPSourceInfo.cpp \ 
    103110                        APICommonCode/SourceInfo.cpp \ 
    104111                        APICommonCode/QTAccessFile.cpp \ 
     112                        APICommonCode/QTSS3GPPModuleUtils.cpp \ 
    105113                        SafeStdLib/InternalStdLib.cpp \ 
    106114                        APIModules/QTSSAccessLogModule/QTSSAccessLogModule.cpp \ 
    107115                        APIModules/QTSSFileModule/QTSSFileModule.cpp \ 
  • DarwinStreamingSrvr6.0.3-Source/RTSPClientLib/PlayerSimulator.h

    old new  
    3131#ifndef _PLAYERSIMULATOR_H_ 
    3232#define _PLAYERSIMULATOR_H_ 
    3333 
    34 #include "SafeStdLib.h"" 
     34#include "SafeStdLib.h" 
    3535#include "OSHeaders.h" 
    3636#include "OS.h" 
    3737#include "SVector.h" 
  • DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSSErrorLogModule.cpp

    old new  
    4141#include "OS.h" 
    4242#include "Task.h" 
    4343 
     44#ifdef __linux__ 
     45size_t strlcpy(char *dst, const char *src, size_t siz); 
     46size_t strlcpy(char *dst, const char *src, size_t siz) 
     47{ 
     48        char *d = dst; 
     49        const char *s = src; 
     50        size_t n = siz; 
     51 
     52        /* Copy as many bytes as will fit */ 
     53        if (n != 0) { 
     54                while (--n != 0) { 
     55                        if ((*d++ = *s++) == '\0') 
     56                                break; 
     57                } 
     58        } 
     59 
     60        /* Not enough room in dst, add NUL and traverse rest of src */ 
     61        if (n == 0) { 
     62                if (siz != 0) 
     63                        *d = '\0';              /* NUL-terminate dst */ 
     64                while (*s++) 
     65                        ; 
     66        } 
     67 
     68        return(s - src - 1);    /* count does not include NUL */ 
     69} 
     70#endif 
     71 
    4472// STATIC FUNCTIONS 
    4573 
    4674// The dispatch function for this module 
  • DarwinStreamingSrvr6.0.3-Source/Server.tproj/QTSServer.cpp

    old new  
    8585#include "RTCPTask.h" 
    8686#include "QTSSFile.h" 
    8787 
    88 #include "RTPStream3GPP.h" 
     88#include "RTPStream3gpp.h" 
    8989#include "RTSPRequest3GPP.h" 
    9090 
    9191// CLASS DEFINITIONS 
     
    680680    (void)AddModule(theWebDebug); 
    681681#endif 
    682682 
     683#ifdef __MacOSX__ 
    683684    QTSSModule* theQTSSDSAuthModule = new QTSSModule("QTSSDSAuthModule"); 
    684685    (void)theQTSSDSAuthModule->SetupModule(&sCallbacks, &QTSSDSAuthModule_Main); 
    685686    (void)AddModule(theQTSSDSAuthModule);  
     687#endif 
    686688 
    687689    QTSSModule* theQTACCESSmodule = new QTSSModule("QTSSAccessModule"); 
    688690    (void)theQTACCESSmodule->SetupModule(&sCallbacks, &QTSSAccessModule_Main); 
  • DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPSession.cpp

    old new  
    3838#include "RTSPProtocol.h"  
    3939#include "QTSServerInterface.h" 
    4040#include "QTSS.h" 
    41 #include "RTSPRequest3gpp.h" 
     41#include "RTSPRequest3GPP.h" 
    4242 
    4343#include "OS.h" 
    4444#include "OSMemory.h" 
  • DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream3gpp.cpp

    old new  
    3434#include "RTPStream.h" 
    3535#include "RTPStream3gpp.h" 
    3636#include "RTPSessionInterface.h" 
    37 #include "RTSPRequest3gpp.h" 
     37#include "RTSPRequest3GPP.h" 
    3838#include "RTCPAPPNADUPacket.h" 
    3939 
    4040#if DEBUG 
  • DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTPStream.h

    old new  
    5757 
    5858#include "RTCPPacket.h" 
    5959 
    60 #include "RTSPRequest3gpp.h" 
     60#include "RTSPRequest3GPP.h" 
    6161 
    6262#ifndef MIN 
    6363#define MIN(a,b) (((a)<(b))?(a):(b)) 
  • DarwinStreamingSrvr6.0.3-Source/Server.tproj/RTSPRequest3GPP.cpp

    old new  
    3232*/ 
    3333 
    3434 
    35 #include "RTSPRequest3gpp.h" 
     35#include "RTSPRequest3GPP.h" 
    3636#include "RTSPProtocol.h" 
    3737#include "QTSServerInterface.h" 
    3838 
  • DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/Makefile.POSIX

    old new  
    2222CCFLAGS += -I../PrefsSourceLib 
    2323CCFLAGS += -I../APIStubLib 
    2424CCFLAGS += -I../RTPMetaInfoLib 
     25CCFLAGS += -I../RTCPUtilitiesLib 
    2526 
    2627# EACH DIRECTORY WITH A STATIC LIBRARY MUST BE APPENDED IN THIS MANNER TO THE LINKOPTS 
    2728 
     
    3940                        ../PrefsSourceLib/FilePrefsSource.cpp \ 
    4041                        ../APICommonCode/SDPSourceInfo.cpp \ 
    4142                        ../APICommonCode/SourceInfo.cpp \ 
     43                        ../RTCPUtilitiesLib/RTCPPacket.cpp \ 
    4244                        ../RTPMetaInfoLib/RTPMetaInfoPacket.cpp \ 
    4345                        ../OSMemoryLib/OSMemory.cpp 
    4446         
  • DarwinStreamingSrvr6.0.3-Source/StreamingLoadTool/StreamingLoadTool.cpp

    old new  
    135135#ifndef __Win32__ 
    136136        struct sigaction act; 
    137137         
    138 #if defined(sun) || defined(i386) || defined (__MacOSX__) || defined(__powerpc__) || defined (__osf__) || defined (__sgi_cc__) || defined (__hpux__) 
     138#if defined(sun) || defined(i386) || defined(__x86_64__) || defined (__MacOSX__) || defined(__powerpc__) || defined (__osf__) || defined (__sgi_cc__) || defined (__hpux__) 
    139139    sigemptyset(&act.sa_mask); 
    140140    act.sa_flags = 0; 
    141141    act.sa_handler = (void(*)(int))&sigcatcher;