Small changes for the FreeBSD port.

This commit is contained in:
Thomas Schmitt 2008-11-25 12:49:44 +01:00
parent ed1041a069
commit fcf22cffe7
2 changed files with 11 additions and 0 deletions

View File

@ -6,6 +6,7 @@
* published by the Free Software Foundation. See COPYING file for details. * published by the Free Software Foundation. See COPYING file for details.
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>

View File

@ -205,6 +205,7 @@ int rrip_add_PN(Ecma119Image *t, Ecma119Node *n, struct susp_info *susp)
{ {
IsoSpecial *node; IsoSpecial *node;
uint8_t *PN; uint8_t *PN;
int high_shift= 0;
node = (IsoSpecial*)n->node; node = (IsoSpecial*)n->node;
if (node->node.type != LIBISO_SPECIAL) { if (node->node.type != LIBISO_SPECIAL) {
@ -222,6 +223,15 @@ int rrip_add_PN(Ecma119Image *t, Ecma119Node *n, struct susp_info *susp)
PN[2] = 20; PN[2] = 20;
PN[3] = 1; PN[3] = 1;
iso_bb(&PN[4], node->dev >> 32, 4); iso_bb(&PN[4], node->dev >> 32, 4);
/* (dev_t >> 32) causes compiler warnings on FreeBSD.
RRIP 1.10 4.1.2 prescribes PN "Dev_t High" to be 0 on 32 bit dev_t.
*/
if (sizeof(node->dev) > 4) {
high_shift = 32;
iso_bb(&PN[4], node->dev >> high_shift, 4);
} else
iso_bb(&PN[4], 0, 4);
iso_bb(&PN[12], node->dev & 0xffffffff, 4); iso_bb(&PN[12], node->dev & 0xffffffff, 4);
return susp_append(t, susp, PN); return susp_append(t, susp, PN);
} }