GNOME Bugzilla – Bug 135139
Add NetBSD support to gnome-cd
Last modified: 2004-12-22 21:47:04 UTC
The attached patch adds NetBSD support to gnome-cd. I'm not sure who did it in the first place, but I think he was René Hexel. I'd suggest renaming freebsd-cdrom.[ch] to bsd-cdrom.[ch] to avoid confusion, as well as the CDROM_HOST_FREEBSD variable used in configure. But I'll leave this up to you ;) (Note that this patch has been in NetBSD's pkgsrc for a long time, so it has been tested by several people).
Created attachment 24659 [details] [review] Patch to add NetBSD support
I think that this: - if (ioctl (cdrom->fd, CDIOREADTOCENTRY, &tocentry) < 0) { + if (ioctl (cdrom->fd, CDIOREADTOCENTRYS, &tocentries) < 0) { Needs and #ifdef around it, right? I don't have BSD to test this file at all, but I don't think this variable is defined unless __FREEBSD__ is not defined.
You are right. That part of the patch is just wrong, because it's removing some code still needed by FreeBSD, and adding some that won't even compile (where 'some code' = 'one line' ;). I've attached a new patch with the #ifdef around that line. Hope it's right now.
Created attachment 24691 [details] [review] New patch to add NetBSD support (w/o breaking FreeBSD)
I propose to apply this to 2.7.x right after branching off 2.6.x. And yes, I'll rename freebsd->bsd as well.
commited to cvs with relevant changes