Small changes for the FreeBSD port.
This commit is contained in:
parent
ed1041a069
commit
fcf22cffe7
@ -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>
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user