Fix build errors on Fedora

Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
This commit is contained in:
Lon Hohberger 2009-09-17 14:11:08 -04:00
parent 3cf5156968
commit 705b5a18d7
2 changed files with 7 additions and 2 deletions

View File

@ -90,9 +90,9 @@ static int
tcp_exchange(int fd, fence_auth_type_t auth, void *key,
size_t key_len, int timeout)
{
char ret;
fd_set rfds;
struct timeval tv;
char ret = 1;
/* Ok, we're connected */
dbg_printf(3, "Issuing TCP challenge\n");
@ -122,8 +122,10 @@ tcp_exchange(int fd, fence_auth_type_t auth, void *key,
return -1;
/* Read return code */
read(fd, &ret, 1);
if (read(fd, &ret, 1) < 0)
ret = 1;
close(fd);
if (ret == 0)
printf("Remote: Operation was successful\n");
else

View File

@ -7,6 +7,9 @@
#include "y.tab.h"
#include "simpleconfig.h"
/* Some distributions can't use the output from flex without help */
#define ECHO if(fwrite( yytext, yyleng, 1, yyout ))
struct value *val_list = NULL;
struct node *node_list = NULL;
struct parser_context *context_stack = NULL;