File: recvfd.h

package info (click to toggle)
superd 0.0.3-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 136 kB
  • ctags: 85
  • sloc: ansic: 721; makefile: 103; sh: 27
file content (33 lines) | stat: -rw-r--r-- 574 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef RECVFD_H
#define RECVFD_H

#ifdef __GLIBC__

#include <stdio.h> /* NULL, stderr */
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>

#include "wrappers.h"

// #define   CMSG_SPACE(size)        (sizeof(struct cmsghdr) + (size))
// #define   CMSG_LEN(size)          (sizeof(struct cmsghdr) + (size))

ssize_t read_fd(int fd, void *ptr, size_t nbytes, int *recvfd);

#else

#include <sys/uio.h>
#include <poll.h>
#include <sys/socket.h>
#include <stdio.h>
#include "wrappers.h"

#endif


// consistant for all unixes

int recvfd(int sockfd);

#endif