Specifications

Red Hat Enterprise Linux to Oracle Solaris Porting Guide
27
TABLE 3-1. EQUIVALENT SYSTEM CALLS, ALTERNATIVE SYSTEM CALLS, AND WORKAROUNDS
API SYNOPSIS ON LINUX FOR ORACLE SOLARIS 11
int shmctl(int shmid, int cmd, struct
shmid_ds *buf);
shmget #include <sys/ipc.h>
#include <sys/shm.h>
int shmget(key_t key, size_t size, int
shmflg);
Signature on Oracle Solaris is the same.
Also requires #include <sys/types.h>.
sigaction #include <signal.h>
int sigaction(int signum, const struct
sigaction *act, struct sigaction
*oldact);
int sigaction(int sig, const struct
sigaction *restrict act,struct sigaction
*restrict oact);
sigaltstack #include <signal.h>
int sigaltstack(const stack_t *ss,
stack_t *oss);
int sigaltstack(const stack_t *restrict
ss, stack_t *restrict oss);
sigprocmask #include <signal.h>
int sigprocmask(int how, const sigset_t
*set, sigset_t *oldset);
int sigprocmask(int how, const sigset_t
*restrict set,sigset_t *restrict oset);
stat #include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
int stat(const char *path, struct stat
*buf);
int stat(const char *restrict path, struct
stat *restrict buf);
Requires #include <fcntl.h>.
Does not require #include <unistd.h>.
stime #include <time.h>
int stime(time_t *t);
int stime(const time_t *tp);
Requires #include <unistd.h>.
Does not require
#include <time.h>
.
symlinkat #define _ATFILE_SOURCE
#include <fcntl.h> /* Definition of
AT_* constants */ #include <stdio.h>
int symlinkat(const char *oldpath, int
newdirfd, const char *newpath);
Signature on Oracle Solaris is the same.
Requires #include <unistd.h>.
Does not require #define _ATFILE_SOURCE,
#include <fcntl.h>, and #include <stdio.h>.
sysfs int sysfs(int option, const char
*fsname);
int sysfs(int option, unsigned int
fs_index, char *buf); int sysfs(int
option);
int sysfs(int opcode, int fs_index, char
*buf);
Requires #include <sys/fstyp.h> and
#include <sys/fsid.h>.
sysinfo #include <sys/sysinfo.h>
int sysinfo(struct sysinfo *info);
int sysinfo(int command, char *buf, long
count);
Requires #include <sys/systeminfo.h>.
Does not require #include <sys/sysinfo.h>.