Fix bug waf problem with HAVE_CLOCK_SYSCALL
This commit is contained in:
Родитель
7703a4cacb
Коммит
cc67d8efc7
|
@ -104,8 +104,6 @@ def configure(conf):
|
||||||
}
|
}
|
||||||
""", define_name="HAVE_SYNC_FILE_RANGE")
|
""", define_name="HAVE_SYNC_FILE_RANGE")
|
||||||
|
|
||||||
conf.write_config_header('config.h')
|
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
libeio = bld.new_task_gen("cc", "staticlib")
|
libeio = bld.new_task_gen("cc", "staticlib")
|
||||||
libeio.source = "eio.c"
|
libeio.source = "eio.c"
|
||||||
|
|
|
@ -26,20 +26,23 @@ def configure(conf):
|
||||||
code = """
|
code = """
|
||||||
#include <syscall.h>
|
#include <syscall.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts);
|
int status = syscall(SYS_clock_gettime, CLOCK_REALTIME, &ts);
|
||||||
|
puts("1"); // fucking waf...
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
conf.check_cc(fragment=code, define_name="HAVE_CLOCK_SYSCALL")
|
conf.check_cc(fragment=code, define_name="HAVE_CLOCK_SYSCALL", execute=True,
|
||||||
|
msg="Checking for SYS_clock_gettime")
|
||||||
|
|
||||||
conf.check_cc(lib="rt", header_name="time.h", function_name="clock_gettime")
|
conf.check_cc(lib="rt", header_name="time.h", function_name="clock_gettime")
|
||||||
conf.check_cc(lib="rt", header_name="time.h", function_name="nanosleep")
|
conf.check_cc(lib="rt", header_name="time.h", function_name="nanosleep")
|
||||||
conf.check_cc(lib="m", header_name="math.h", function_name="ceil")
|
conf.check_cc(lib="m", header_name="math.h", function_name="ceil")
|
||||||
|
|
||||||
conf.define("HAVE_CONFIG_H", 1)
|
conf.define("HAVE_CONFIG_H", 1)
|
||||||
conf.write_config_header('config.h')
|
|
||||||
|
|
||||||
conf.env.append_value('CCFLAGS', ['-DEV_MULTIPLICITY=0'])
|
conf.env.append_value('CCFLAGS', ['-DEV_MULTIPLICITY=0'])
|
||||||
conf.env.append_value('CXXFLAGS', ['-DEV_MULTIPLICITY=0'])
|
conf.env.append_value('CXXFLAGS', ['-DEV_MULTIPLICITY=0'])
|
||||||
|
|
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче