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

View File

@ -7,6 +7,9 @@
#include "y.tab.h" #include "y.tab.h"
#include "simpleconfig.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 value *val_list = NULL;
struct node *node_list = NULL; struct node *node_list = NULL;
struct parser_context *context_stack = NULL; struct parser_context *context_stack = NULL;