Build fixes for Sortix, mostly relating to missing headers
This commit is contained in:
parent
a8d0a2ff79
commit
ca2242079d
|
@ -66,7 +66,9 @@
|
|||
//=========================================================================
|
||||
|
||||
#if IS_UNIX
|
||||
#include <sys/param.h>
|
||||
#if HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//=========================================================================
|
||||
|
|
|
@ -77,8 +77,13 @@
|
|||
* in "../../include/byteorder.h" to get this information.
|
||||
*/
|
||||
#include "stdcore.h"
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <memory.h>
|
||||
#ifdef HAVE_MEMORY_H
|
||||
#include <memory.h>
|
||||
#else
|
||||
#include <string.h>
|
||||
#endif
|
||||
#include "haval.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
|
|
@ -71,9 +71,12 @@
|
|||
/*
|
||||
* set, reset environment to be passed to mpopem
|
||||
*/
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/file.h>
|
||||
#ifndef _SORTIX_SOURCE
|
||||
# include <sys/file.h>
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <time.h>
|
||||
|
@ -87,7 +90,9 @@
|
|||
# include <unistd.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#include <sys/param.h>
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include "msystem.h"
|
||||
|
||||
|
|
|
@ -54,7 +54,9 @@
|
|||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/param.h>
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_MOUNT_H
|
||||
# include <sys/mount.h>
|
||||
#endif
|
||||
|
@ -390,7 +392,7 @@ void cUnixFSServices::GetMachineNameFullyQualified( TSTRING& strName ) const
|
|||
char buf[256];
|
||||
if (gethostname(buf, 256) != 0)
|
||||
{
|
||||
#ifdef SOLARIS_NO_GETHOSTBYNAME
|
||||
#if defined(SOLARIS_NO_GETHOSTBYNAME) || defined(_SORTIX_SOURCE)
|
||||
strName = buf;
|
||||
return;
|
||||
#else
|
||||
|
@ -445,6 +447,7 @@ bool cUnixFSServices::GetIPAddress( uint32& uiIPAddress )
|
|||
bool fGotAddress = false;
|
||||
cDebug d( _T("cUnixFSServices::GetIPAddress") );
|
||||
|
||||
#ifndef _SORTIX_SOURCE
|
||||
struct utsname utsnameBuf;
|
||||
if( EFAULT != uname( &utsnameBuf) )
|
||||
{
|
||||
|
@ -476,6 +479,7 @@ bool cUnixFSServices::GetIPAddress( uint32& uiIPAddress )
|
|||
}
|
||||
else
|
||||
d.TraceError( _T("uname failed") );
|
||||
#endif
|
||||
|
||||
return( fGotAddress );
|
||||
}
|
||||
|
|
|
@ -35,10 +35,13 @@
|
|||
// Function and classes dealing with the WCHAR16 type
|
||||
//
|
||||
#include "stdcore.h"
|
||||
#include "config.h"
|
||||
#include "wchar16.h"
|
||||
#include "debug.h"
|
||||
#include <stdexcept> // for stl::out_of_range
|
||||
#include <memory.h>
|
||||
#ifdef HAVE_MEMORY_H
|
||||
# include <memory.h>
|
||||
#endif
|
||||
|
||||
int wchar16len(const WCHAR16* s)
|
||||
{
|
||||
|
|
|
@ -3,7 +3,11 @@
|
|||
|
||||
#include "config.h"
|
||||
#include <assert.h>
|
||||
#include <memory.h>
|
||||
#ifdef HAVE_MEMORY_H
|
||||
#include <memory.h>
|
||||
#else
|
||||
#include <string.h>
|
||||
#endif
|
||||
#include <algorithm>
|
||||
|
||||
inline unsigned int bitsToBytes(unsigned int bitCount)
|
||||
|
|
|
@ -54,6 +54,10 @@
|
|||
#include <arpa/inet.h>
|
||||
#include <sys/utsname.h>
|
||||
|
||||
#ifdef _SORTIX_SOURCE
|
||||
# include <sys/select.h>
|
||||
#endif
|
||||
|
||||
/* Some systems like Solaris and AIX don't define
|
||||
* INADDR_NONE, but it's pretty standard. If not,
|
||||
* then the OS _should_ define it for us.
|
||||
|
@ -187,12 +191,16 @@ long cSMTPMailMessage::GetServerAddress()
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifdef _SORTIX_SOURCE
|
||||
return INADDR_NONE;
|
||||
#else
|
||||
// do a DNS lookup of the hostname and get the long
|
||||
hostent *ent = mPfnGethostbyname(sNarrowString.c_str());
|
||||
if (!ent)
|
||||
return INADDR_NONE;
|
||||
else
|
||||
return *(long *)ent->h_addr_list[0];
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
#include "core/displayencoder.h"
|
||||
|
||||
//Provide a swab() impl. from glibc, for platforms that don't have one
|
||||
#if defined(__SYLLABLE__) || defined(__ANDROID_API__)
|
||||
#if defined(__SYLLABLE__) || defined(__ANDROID_API__) || defined(_SORTIX_SOURCE)
|
||||
void swab (const void *bfrom, void *bto, ssize_t n)
|
||||
{
|
||||
const char *from = (const char *) bfrom;
|
||||
|
|
Loading…
Reference in New Issue