diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2004-08-02 07:59:54 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2004-08-02 07:59:54 +0800 |
commit | 2fc36ac0b075e486cc66b064fe203d01dceef6bb (patch) | |
tree | 9e3fc4dfba86f9c845b74850892eaf5335b93875 /sysutils/nautilus-cd-burner | |
parent | 2b55d8dc2ec0f8bf229db636ce8a973571376c44 (diff) | |
download | marcuscom-ports-2fc36ac0b075e486cc66b064fe203d01dceef6bb.tar marcuscom-ports-2fc36ac0b075e486cc66b064fe203d01dceef6bb.tar.gz marcuscom-ports-2fc36ac0b075e486cc66b064fe203d01dceef6bb.tar.bz2 marcuscom-ports-2fc36ac0b075e486cc66b064fe203d01dceef6bb.tar.lz marcuscom-ports-2fc36ac0b075e486cc66b064fe203d01dceef6bb.tar.xz marcuscom-ports-2fc36ac0b075e486cc66b064fe203d01dceef6bb.tar.zst marcuscom-ports-2fc36ac0b075e486cc66b064fe203d01dceef6bb.zip |
Fix the build after some messed up #ifdef's.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@2583 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils/nautilus-cd-burner')
-rw-r--r-- | sysutils/nautilus-cd-burner/files/patch-cd-drive.c | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/sysutils/nautilus-cd-burner/files/patch-cd-drive.c b/sysutils/nautilus-cd-burner/files/patch-cd-drive.c new file mode 100644 index 000000000..0ac6cbb26 --- /dev/null +++ b/sysutils/nautilus-cd-burner/files/patch-cd-drive.c @@ -0,0 +1,102 @@ +--- cd-drive.c.orig Sun Aug 1 19:58:03 2004 ++++ cd-drive.c Sun Aug 1 19:59:15 2004 +@@ -484,9 +484,49 @@ + #endif /* USE_HAL */ + + #if defined(__linux__) || defined(__FreeBSD__) ++static int ++get_device_max_write_speed (char *device) ++{ ++ int fd; ++ int max_speed; ++ int read_speed, write_speed; + ++ max_speed = -1; + ++ fd = open (device, O_RDONLY|O_EXCL|O_NONBLOCK); ++ if (fd < 0) { ++ return -1; ++ } + ++ get_read_write_speed (fd, &read_speed, &write_speed); ++ close (fd); ++ max_speed = (int)floor (write_speed) / CD_ROM_SPEED; ++ ++ return max_speed; ++} ++ ++#if !defined(__linux) ++static int ++get_device_max_read_speed (char *device) ++{ ++ int fd; ++ int max_speed; ++ int read_speed, write_speed; ++ ++ max_speed = -1; ++ ++ fd = open (device, O_RDONLY|O_EXCL|O_NONBLOCK); ++ if (fd < 0) { ++ return -1; ++ } ++ ++ get_read_write_speed (fd, &read_speed, &write_speed); ++ close (fd); ++ max_speed = (int)floor (read_speed) / CD_ROM_SPEED; ++ ++ return max_speed; ++} ++#endif + #endif /* __linux__ || __FreeBSD__ */ + + #if defined (__linux__) +@@ -689,49 +729,7 @@ + return NULL; + } + +-#if !defined(__linux) +-static int +-get_device_max_read_speed (char *device) +-{ +- int fd; +- int max_speed; +- int read_speed, write_speed; +- +- max_speed = -1; +- +- fd = open (device, O_RDONLY|O_EXCL|O_NONBLOCK); +- if (fd < 0) { +- return -1; +- } +- +- get_read_write_speed (fd, &read_speed, &write_speed); +- close (fd); +- max_speed = (int)floor (read_speed) / CD_ROM_SPEED; +- +- return max_speed; +-} +-#endif +- +-static int +-get_device_max_write_speed (char *device) +-{ +- int fd; +- int max_speed; +- int read_speed, write_speed; +- +- max_speed = -1; +- +- fd = open (device, O_RDONLY|O_EXCL|O_NONBLOCK); +- if (fd < 0) { +- return -1; +- } +- +- get_read_write_speed (fd, &read_speed, &write_speed); +- close (fd); +- max_speed = (int)floor (write_speed) / CD_ROM_SPEED; + +- return max_speed; +-} + + static char * + get_scsi_cd_name (int bus, int id, int lun, const char *dev, |