Make this compilable on latest Linux'es without warnings.
Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
3bcc218f46
commit
0ea64e38ac
@ -27,6 +27,7 @@
|
|||||||
* $FreeBSD$
|
* $FreeBSD$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sys/file.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
#include <sys/mount.h>
|
#include <sys/mount.h>
|
||||||
@ -39,6 +40,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -51,9 +53,13 @@
|
|||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#else
|
#else
|
||||||
#ifndef __unused
|
#ifndef __unused
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#define __unused __attribute__((__unused__))
|
||||||
|
#else
|
||||||
#define __unused
|
#define __unused
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
int verbose = 0;
|
int verbose = 0;
|
||||||
|
|
||||||
@ -1329,7 +1335,6 @@ test15(int fd, __unused int argc, const __unused char **argv)
|
|||||||
*/
|
*/
|
||||||
int pid;
|
int pid;
|
||||||
int pfd[2];
|
int pfd[2];
|
||||||
int fd2;
|
|
||||||
struct flock fl;
|
struct flock fl;
|
||||||
char ch;
|
char ch;
|
||||||
int res;
|
int res;
|
||||||
@ -1366,7 +1371,7 @@ test15(int fd, __unused int argc, const __unused char **argv)
|
|||||||
if (read(pfd[0], &ch, 1) != 1)
|
if (read(pfd[0], &ch, 1) != 1)
|
||||||
err(1, "reading from pipe (child)");
|
err(1, "reading from pipe (child)");
|
||||||
|
|
||||||
fd2 = dup(fd);
|
(void)dup(fd);
|
||||||
if (flock(fd, LOCK_SH) < 0)
|
if (flock(fd, LOCK_SH) < 0)
|
||||||
err(1, "flock shared");
|
err(1, "flock shared");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user