Move Linux specific includes to the place where they actually required.

This commit is contained in:
Alexander Nedotsukov 2006-10-15 13:07:43 +00:00
parent 0710bbb4fb
commit e28798d8a0
2 changed files with 7 additions and 10 deletions

View File

@ -17,6 +17,8 @@
#include <sys/poll.h>
#include <linux/hdreg.h>
#include <stdlib.h>
#include <scsi/sg.h>
#include <scsi/scsi.h>
#include "transport.h"
#include "drive.h"
@ -28,6 +30,11 @@
#include "toc.h"
#include "util.h"
/* kludge! glibc headers don't define all the SCSI stuff that we use! */
#ifndef SG_GET_ACCESS_COUNT
# define SG_GET_ACCESS_COUNT 0x2289
#endif
#include "libdax_msgs.h"
extern struct libdax_msgs *libdax_messenger;

View File

@ -15,20 +15,10 @@
#else /* __FreeBSD__ */
/* XXX Why do we need this here? */
/* ts A61013: because Linux wants to see them */
#include <scsi/sg.h>
#include <scsi/scsi.h>
#define BUFFER_SIZE 65536
#endif /* ! __FreeBSD__ */
/* kludge! glibc headers don't define all the SCSI shit that we use! */
#ifndef SG_GET_ACCESS_COUNT
# define SG_GET_ACCESS_COUNT 0x2289
#endif
enum transfer_direction
{ TO_DRIVE, FROM_DRIVE, NO_TRANSFER };