all: add missing includes
parent
2be0777c98
commit
7fd9827318
|
@ -16,6 +16,11 @@ CommonCHeaders = '
|
|||
#include <locale.h> // tolower
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <execinfo.h> // for backtrace and backtrace_symbols_fd
|
||||
#endif
|
||||
|
||||
|
||||
#define EMPTY_STRUCT_DECLARATION
|
||||
#define OPTION_CAST(x) (x)
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
module builtin
|
||||
|
||||
#include <float.h>
|
||||
#include <math.h>
|
||||
|
||||
pub fn (d double) str() string {
|
||||
buf := malloc(sizeof(double) * 5 + 1)// TODO
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
module rand
|
||||
|
||||
#include <Security/SecRandom.h>
|
||||
|
||||
#flag darwin -framework Security
|
||||
|
||||
pub fn read(bytes_needed int) ?[]byte {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
module net
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
module net
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
|
|
|
@ -9,7 +9,6 @@ module os
|
|||
#include <errno.h>
|
||||
|
||||
$if mac {
|
||||
#include <execinfo.h> // for backtrace and backtrace_symbols_fd
|
||||
#include <libproc.h> // proc_pidpath
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ const (
|
|||
)
|
||||
|
||||
#include <time.h>
|
||||
#include <unistd.h> // sleep
|
||||
|
||||
$if !windows {
|
||||
#include <sys/time.h>
|
||||
|
|
Loading…
Reference in New Issue