Fixes for C++17
This commit is contained in:
parent
37d46b6149
commit
cfcd34b06e
|
@ -3,7 +3,7 @@
|
|||
* traditionally complex, proprietary hardware systems.
|
||||
*
|
||||
* Copyright 2011-2014 Range Networks, Inc.
|
||||
*
|
||||
* Patched by FlUxIuS @ Penthertz SAS
|
||||
* This software is distributed under the terms of the GNU Affero General
|
||||
* Public License version 3. See the COPYING and NOTICE files in the main
|
||||
* directory for licensing information.
|
||||
|
@ -31,6 +31,18 @@
|
|||
Basetype* operator&() { return &value; } \
|
||||
|
||||
|
||||
#define _INITIALIZED_SCALAR_FUNCSBOOL(Classname,Basetype,Init) \
|
||||
Classname() : value(Init) {} \
|
||||
Classname(Basetype wvalue) { value = wvalue; } /* Can set from basetype. */ \
|
||||
operator Basetype(void) const { return value; } /* Converts from basetype. */ \
|
||||
Basetype operator++() { return true; } \
|
||||
Basetype operator++(int) { return true; } \
|
||||
Basetype operator=(Basetype wvalue) { return value = wvalue; } \
|
||||
Basetype operator+=(Basetype wvalue) { return value = value + wvalue; } \
|
||||
Basetype operator-=(Basetype wvalue) { return value = value - wvalue; } \
|
||||
Basetype* operator&() { return &value; } \
|
||||
|
||||
|
||||
#define _DECLARE_SCALAR_TYPE(Classname_i,Classname_z,Basetype) \
|
||||
template <Basetype Init> \
|
||||
struct Classname_i { \
|
||||
|
@ -39,6 +51,14 @@
|
|||
}; \
|
||||
typedef Classname_i<0> Classname_z;
|
||||
|
||||
#define _DECLARE_SCALAR_TYPEBOOL(Classname_i,Classname_z,Basetype) \
|
||||
template <Basetype Init> \
|
||||
struct Classname_i { \
|
||||
Basetype value; \
|
||||
_INITIALIZED_SCALAR_FUNCSBOOL(Classname_i,Basetype,Init) \
|
||||
}; \
|
||||
typedef Classname_i<0> Classname_z;
|
||||
|
||||
|
||||
// Usage:
|
||||
// Where 'classname' is one of the types listed below, then:
|
||||
|
@ -55,7 +75,7 @@ _DECLARE_SCALAR_TYPE(UInt8_i, UInt8_z, uint8_t)
|
|||
_DECLARE_SCALAR_TYPE(UInt16_i, UInt16_z, uint16_t)
|
||||
_DECLARE_SCALAR_TYPE(UInt32_i, UInt32_z, uint32_t)
|
||||
_DECLARE_SCALAR_TYPE(Size_t_i, Size_t_z, size_t)
|
||||
_DECLARE_SCALAR_TYPE(Bool_i, Bool_z, bool)
|
||||
_DECLARE_SCALAR_TYPEBOOL(Bool_i, Bool_z, bool)
|
||||
|
||||
// float is special, because C++ does not permit the template initalization:
|
||||
struct Float_z {
|
||||
|
|
|
@ -754,7 +754,7 @@ void SIPEngine::InitRTP(const osip_message_t * msg )
|
|||
#ifdef ORTP_NEW_API
|
||||
rtp_session_set_local_addr(mSession, "0.0.0.0", mRTPPort, -1);
|
||||
#else
|
||||
rtp_session_set_local_addr(mSession, "0.0.0.0", mRTPPort);
|
||||
rtp_session_set_local_addr(mSession, "0.0.0.0", mRTPPort, mRTPPort+1);
|
||||
#endif
|
||||
rtp_session_set_remote_addr(mSession, d_ip_addr, atoi(d_port));
|
||||
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
#!/bin/bash
|
||||
# This script has been tested in Ubuntu 16.04 and 18.04. Please report any problem you find.
|
||||
|
||||
# Latest UHD from Ettus PPA
|
||||
sudo add-apt-repository ppa:ettusresearch/uhd
|
||||
sudo apt-get update
|
||||
sudo apt-get install libuhd-dev libuhd003 uhd-host
|
||||
# Install all package dependencies
|
||||
sudo apt install autoconf libtool build-essential libuhd-dev uhd-host libzmq3-dev libosip2-dev libortp-dev libusb-1.0-0-dev asn1c libtool-bin libsqlite3-dev libreadline-dev
|
||||
|
||||
# Other dependencies, mostly build-time
|
||||
sudo apt-get install git autoconf libtool libtool-bin gpp g++ libzmq3-dev pkg-config libosip2-dev libortp-dev libusb-dev libusb-1.0-0-dev libreadline-dev libsqlite3-dev -y
|
||||
# Clone submodules from base repo
|
||||
git submodule init
|
||||
git submodule update
|
||||
|
|
Loading…
Reference in New Issue