projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
bb4457d
)
FreeBSD compile fixes (thanks to XeF4)
author
Guus Sliepen
<guus@tinc-vpn.org>
Tue, 6 Feb 2001 10:12:51 +0000
(10:12 +0000)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Tue, 6 Feb 2001 10:12:51 +0000
(10:12 +0000)
lib/dropin.c
patch
|
blob
|
history
src/protocol.c
patch
|
blob
|
history
diff --git
a/lib/dropin.c
b/lib/dropin.c
index
518a175
..
9de5c2c
100644
(file)
--- a/
lib/dropin.c
+++ b/
lib/dropin.c
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: dropin.c,v 1.1.2.
3 2001/01/07 17:08:49
guus Exp $
+ $Id: dropin.c,v 1.1.2.
4 2001/02/06 10:12:51
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-31,6
+31,7
@@
#include <xalloc.h>
#include <system.h>
#include <xalloc.h>
#include <system.h>
+#include <errno.h>
#ifndef HAVE_DAEMON
/*
#ifndef HAVE_DAEMON
/*
@@
-113,6
+114,7
@@
char *get_current_dir_name(void)
{
size_t size;
char *buf;
{
size_t size;
char *buf;
+ char *r;
/* Start with 100 bytes. If this turns out to be insufficient to
contain the working directory, double the size. */
/* Start with 100 bytes. If this turns out to be insufficient to
contain the working directory, double the size. */
@@
-123,7
+125,7
@@
char *get_current_dir_name(void)
r = getcwd(buf, size);
/* getcwd returns NULL and sets errno to ERANGE if the bufferspace
is insufficient to contain the entire working directory. */
r = getcwd(buf, size);
/* getcwd returns NULL and sets errno to ERANGE if the bufferspace
is insufficient to contain the entire working directory. */
- while(r == NULL && errno = ERANGE)
+ while(r == NULL && errno =
=
ERANGE)
{
free(buf);
size <<= 1; /* double the size */
{
free(buf);
size <<= 1; /* double the size */
diff --git
a/src/protocol.c
b/src/protocol.c
index
a145c98
..
5e72017
100644
(file)
--- a/
src/protocol.c
+++ b/
src/protocol.c
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: protocol.c,v 1.28.4.7
6 2001/01/08 20:35:30
guus Exp $
+ $Id: protocol.c,v 1.28.4.7
7 2001/02/06 10:12:51
guus Exp $
*/
#include "config.h"
*/
#include "config.h"
@@
-1043,12
+1043,12
@@
cp
return 0;
}
return 0;
}
-int send_error(connection_t *cl, int err
no
, char *errstring)
+int send_error(connection_t *cl, int err, char *errstring)
{
cp
if(!errstring)
{
cp
if(!errstring)
- errstring = strerror(err
no
);
- return send_request(cl, "%d %d %s", ERROR, err
no
, errstring);
+ errstring = strerror(err);
+ return send_request(cl, "%d %d %s", ERROR, err, errstring);
}
int error_h(connection_t *cl)
}
int error_h(connection_t *cl)