aboutsummaryrefslogtreecommitdiff
path: root/sysutils/lineakd/files/extra-patch-lineakd.c-5
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/lineakd/files/extra-patch-lineakd.c-5')
-rw-r--r--sysutils/lineakd/files/extra-patch-lineakd.c-569
1 files changed, 69 insertions, 0 deletions
diff --git a/sysutils/lineakd/files/extra-patch-lineakd.c-5 b/sysutils/lineakd/files/extra-patch-lineakd.c-5
new file mode 100644
index 000000000000..5112f45b8564
--- /dev/null
+++ b/sysutils/lineakd/files/extra-patch-lineakd.c-5
@@ -0,0 +1,69 @@
+--- src/lineakd.c.orig Fri Sep 6 02:50:29 2002
++++ src/lineakd.c Sat May 24 18:01:00 2003
+@@ -57,18 +57,19 @@
+ #endif
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
+-#include <linux/cdrom.h> /* linux specific?!! */
+
+ extern int mkdir(); /* in linux/fs.h ... other platforms!? */
+
+ #if defined (__FreeBSD__)
+-# include <machine/soundcard.h>
++# include <sys/soundcard.h>
++# include <sys/cdio.h>
+ #else
+ # if defined (__NetBSD__) || defined (__OpenBSD__)
+ # include <soundcard.h> /* OSS emulation */
+ # undef ioctl
+ # else
+ /* BSDI, Linux, Solaris */
++# include <linux/cdrom.h> /* linux specific?!! */
+ # include <sys/soundcard.h>
+ # endif
+ #endif
+@@ -100,7 +101,7 @@
+ signal(SIGABRT, signalexit);
+ signal(SIGINT, signalexit);
+ /* and one so we won't have to wait() for child processes ;) */
+- signal(SIGCLD, SIG_IGN);
++ signal(SIGCHLD, SIG_IGN);
+ /* and for a rehash when we catch SIGHUP */
+ signal(SIGHUP,signalHUP);
+
+@@ -598,12 +599,12 @@
+ /* try to open the device .. */
+ if ( (fp = open(cdromdev, O_RDONLY | O_NONBLOCK)) != -1 ) {
+ /* tell the drive to diable auto-eject */
+- if ( (ioctl(fp, CDROMEJECT_SW, 0)) == -1 )
+- printf("... oops! error during CD-ROM init\n");
+- close(fp);
+- } else {
++ if ( (ioctl(fp, CDIOCPREVENT)) == -1 )
++ printf("... oops! error during CD-ROM init\n");
++ close(fp);
++ } else {
+ printf("... oops! unable to open the CD-ROM device \"%s\" (CD-ROM init)\n",cdromdev);
+- }
++ }
+ } else {
+ printf("no CD-ROM device configured! (CD-ROM init)\n");
+ }
+@@ -618,7 +619,7 @@
+ if ( (fp = open(cdromdev, O_RDONLY | O_NONBLOCK)) != -1 ) {
+ if (!cdromstatus) { /* assumed closed */
+ /* enable the drives software eject */
+- if ( (ioctl(fp, CDROMEJECT_SW, 1)) == -1 )
++ if ( (ioctl(fp, CDIOCALLOW)) == -1 )
+ printf("... oops! error enabling CD-ROM SW eject\n");
+ /* eject the cdrom tray */
+ if (verbosemode) printf("... ejecting the CD-ROM tray\n");
+@@ -628,7 +629,7 @@
+ cdromstatus = !cdromstatus;
+ } else { /* assumed open */
+ /* disable the drives software eject again.. */
+- if ( (ioctl(fp, CDROMEJECT_SW, 0)) == -1 )
++ if ( (ioctl(fp, CDIOCPREVENT)) == -1 )
+ printf("... oops! error disabling CD-ROM SW eject\n");
+ /* close the cdrom tray */
+ if (verbosemode) printf("... closing the CD-ROM tray\n");