Porting to a new machine or operating system ordinarily requires
./machines directory and the
./compilers directories in order to define the build
environment and autoconfigure means. You will probably have to modify
ntp_machines.h file and
as well. The two most famous trouble spots are the I/O code in
./xntpd/ntp_io.c and the clock adjustment code in
These are the rules so that older bsd systems and the POSIX standard system can coexist together.
selectis not standard, since it is very system dependent as to where it is defined. The logic to include the right system dependent include file is in
"ntp_malloc.h"if you use
./include/ntp_machine.hbased on system identifier. This file is included by the
"ntp_types.h"file and should always be placed first after the
"l_stdlib.h"file. This file is included by the
"ntp_stdlib.h"file and should ordinarily be placed last in the includes list.
"l_stdlib.h" can contain any extra definitions that are
needed so that
gcc will shut up. They should be controlled
by a system identifier and there should be a separate section for each
system. Really this will make it easier to maintain.
include/ntp_machines.h for the various compile time
When you are satisfied the port works and that other ports are not adversely affected, please send patches for the system files you have changed, as well as any documentation that should be updated, including the advice herein.