Specifications

Red Hat Enterprise Linux to Oracle Solaris Porting Guide
26
TABLE 3-1. EQUIVALENT SYSTEM CALLS, ALTERNATIVE SYSTEM CALLS, AND WORKAROUNDS
API SYNOPSIS ON LINUX FOR ORACLE SOLARIS 11
profil #include <unistd.h>
int profil(unsigned short *buf, size_t
bufsiz, size_t offset, unsigned, int
scale);
void profil(unsigned short *buff, unsigned
int bufsiz, unsigned int offset,unsigned
int scale);
readlink #include <unistd.h>
ssize_t readlink(const char *path, char
*buf, size_t bufsiz);
ssize_t readlink(const char *restrict
path, char *restrict buf, size_t bufsiz);
readlinkat #define _ATFILE_SOURCE
#include <fcntl.h> /* Definition of
AT_* constants */ #include <unistd.h>
int readlinkat(int dirfd, const char
*pathname, char *buf, size_t bufsiz);
ssize_t readlinkat(int fd, const char
*restrict path, char *restrict buf, size_t
bufsize);
Does not require #define _ATFILE_SOURCE and
#include <fcntl.h>.
renameat #define _ATFILE_SOURCE
#include <fcntl.h> /* Definition of
AT_* constants */ #include <stdio.h>
int renameat(int olddirfd, const char
*oldpath, int newdirfd, const char
*newpath);
Signature on Oracle Solaris is the same.
Requires only #include <unistd.h>.
semop #include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
int semop(int semid, struct sembuf
*sops, unsigned nsops);
int semop(int semid, struct sembuf *sops,
size_t nsops);
semtimedop #include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
int semtimedop(int semid, struct sembuf
*sops, unsigned nsops,struct timespec
*timeout);
int semtimedop(int semid, struct sembuf
*sops, size_t nsops,const struct timespec
*timeout);
setgroups #include <grp.h>
int setgroups(size_t size, const gid_t
*list);
int setgroups(int ngroups, const gid_t
*grouplist);
Requires
<unistd.h>
and does not require
<grp.h>
.
setpgid #include <unistd.h>
int setpgid(pid_t pid, pid_t pgid);
Signature on Oracle Solaris is the same.
Requires #include <sys/types.h>.
setsid #include <unistd.h>
pid_t setsid(void);
Signature on Oracle Solaris is the same.
Requires #include <sys/types.h>.
shmctl #include <sys/ipc.h>
#include <sys/shm.h>
Signature on Oracle Solaris is the same.
Also requires #include <sys/types.h>.