Commit 17523212 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make struct storage fields used onlyr for SENDFILE_WORKS conditional.

Spotted by:	sky
parent 8e58c809
......@@ -382,8 +382,10 @@ struct storage {
unsigned len;
unsigned space;
#ifdef SENDFILE_WORKS
int fd;
off_t where;
#endif
};
/* Object core structure ---------------------------------------------
......
......@@ -487,8 +487,10 @@ smf_alloc(struct stevedore *st, size_t size)
smf->s.ptr = smf->ptr;
smf->s.len = 0;
smf->s.stevedore = st;
#ifdef SENDFILE_WORKS
smf->s.fd = smf->sc->fd;
smf->s.where = smf->offset;
#endif
return (&smf->s);
}
......
......@@ -95,7 +95,9 @@ sma_alloc(struct stevedore *st, size_t size)
}
sma->s.len = 0;
sma->s.space = size;
#ifdef SENDFILE_WORKS
sma->s.fd = -1;
#endif
sma->s.stevedore = st;
sma->s.magic = STORAGE_MAGIC;
return (&sma->s);
......
......@@ -450,7 +450,9 @@ smp_allocx(struct stevedore *st, size_t min_size, size_t max_size,
ss->space = max_size;
ss->priv = sc;
ss->stevedore = st;
#ifdef SENDFILE_WORKS
ss->fd = sc->fd;
#endif
if (ssg != NULL)
*ssg = sg;
return (ss);
......
......@@ -91,7 +91,9 @@ SMS_Makesynth(struct object *obj)
sto->priv = vsb;
sto->len = 0;
sto->space = 0;
#ifdef SENDFILE_WORKS
sto->fd = -1;
#endif
sto->stevedore = &sms_stevedore;
sto->magic = STORAGE_MAGIC;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment