amd64 fixes
This commit is contained in:
@ -15,7 +15,7 @@ lfdchan(int fd)
|
||||
|
||||
c = newchan();
|
||||
c->type = devno('L', 0);
|
||||
c->aux = (void*)fd;
|
||||
c->aux = (void*)(uintptr)fd;
|
||||
c->name = newcname("fd");
|
||||
c->mode = ORDWR;
|
||||
c->qid.type = 0;
|
||||
@ -76,14 +76,14 @@ lfdopen(Chan *c, int omode)
|
||||
static void
|
||||
lfdclose(Chan *c)
|
||||
{
|
||||
close((int)c->aux);
|
||||
close((int)(uintptr)c->aux);
|
||||
}
|
||||
|
||||
static long
|
||||
lfdread(Chan *c, void *buf, long n, vlong off)
|
||||
{
|
||||
USED(off); /* can't pread on pipes */
|
||||
n = read((int)c->aux, buf, n);
|
||||
n = read((int)(uintptr)c->aux, buf, n);
|
||||
if(n < 0){
|
||||
iprint("error %d\n", errno);
|
||||
oserror();
|
||||
@ -96,7 +96,7 @@ lfdwrite(Chan *c, void *buf, long n, vlong off)
|
||||
{
|
||||
USED(off); /* can't pread on pipes */
|
||||
|
||||
n = write((int)c->aux, buf, n);
|
||||
n = write((int)(uintptr)c->aux, buf, n);
|
||||
if(n < 0){
|
||||
iprint("error %d\n", errno);
|
||||
oserror();
|
||||
|
Reference in New Issue
Block a user