void calc_dirs_n_files(int relh, int home, const char *relhome,const char *ctdldir)
{
- const char* basedir;
- char dirbuffer[PATH_MAX]="";
+ const char* basedir = "";
+ char dirbuffer[PATH_MAX] = "";
/*
* Ok, we keep our binaries either in the citadel base dir,
#include <dirent.h>
#include <errno.h>
#include <limits.h>
-/* #include <dlfcn.h> */
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
*/
void begin_session(struct CitContext *con)
{
- int len;
+ socklen_t len;
struct sockaddr_in sin;
/*
con->cs_host[sizeof con->cs_host - 1] = 0;
len = sizeof sin;
if (!CC->is_local_socket) {
- if (!getpeername(con->client_socket,
- (struct sockaddr *) &sin, &len)) /* should be socklen_t but doesn't work on Macintosh */
+ if (!getpeername(con->client_socket, (struct sockaddr *) &sin, &len)) {
locate_host(con->cs_host, sizeof con->cs_host,
con->cs_addr, sizeof con->cs_addr,
- &sin.sin_addr);
+ &sin.sin_addr
+ );
+ }
}
else {
strcpy(con->cs_host, "");
/* Iterate over any multiple answers we might have. In
this context, it's unlikely, but anyway. */
- rp = result;
- rend = result + RESULT_SIZE - 1;
+ rp = (u_char *) result;
+ rend = (u_char *) result + RESULT_SIZE - 1;
while( cp < cend && rp < rend )
{
a = *cp++;