Commit 1b4a8156 authored by serg@serg.mylan's avatar serg@serg.mylan

Fedora now defines read(2)/write(2) as macros.

Argh!
parent 2d666071
......@@ -138,8 +138,8 @@ int vio_close_shared_memory(Vio * vio);
#if defined(HAVE_VIO) && !defined(DONT_MAP_VIO)
#define vio_delete(vio) (vio)->viodelete(vio)
#define vio_errno(vio) (vio)->vioerrno(vio)
#define vio_read(vio, buf, size) (vio)->read(vio,buf,size)
#define vio_write(vio, buf, size) (vio)->write(vio, buf, size)
#define vio_read(vio, buf, size) ((vio)->read)(vio,buf,size)
#define vio_write(vio, buf, size) ((vio)->write)(vio, buf, size)
#define vio_blocking(vio, set_blocking_mode, old_mode)\
(vio)->vioblocking(vio, set_blocking_mode, old_mode)
#define vio_is_blocking(vio) (vio)->is_blocking(vio)
......
......@@ -115,7 +115,7 @@ main(int argc, char** argv)
{
/* child, therefore, client */
char xbuf[100];
int r = client_vio->read(client_vio,xbuf, sizeof(xbuf));
int r = vio_read(client_vio,xbuf, sizeof(xbuf));
if (r<=0) {
my_free((gptr)ssl_acceptor,MYF(0));
my_free((gptr)ssl_connector,MYF(0));
......@@ -130,7 +130,7 @@ main(int argc, char** argv)
else
{
const char* s = "Huhuhuh";
int r = server_vio->write(server_vio,(gptr)s, strlen(s));
int r = vio_write(server_vio,(gptr)s, strlen(s));
if (r<=0) {
my_free((gptr)ssl_acceptor,MYF(0));
my_free((gptr)ssl_connector,MYF(0));
......
......@@ -83,7 +83,7 @@ main( int argc __attribute__((unused)),
/* Now we have TCP conncetion. Start SSL negotiation. */
read(client_vio->sd,xbuf, sizeof(xbuf));
sslconnect(ssl_connector,client_vio,60L);
err = client_vio->read(client_vio,xbuf, sizeof(xbuf));
err = vio_read(client_vio,xbuf, sizeof(xbuf));
if (err<=0) {
my_free((gptr)ssl_connector,MYF(0));
fatal_error("client:SSL_read");
......
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