]> arthur.barton.de Git - netatalk.git/commitdiff
Merge remote branch 'origin/master' into branch-allea
authorFrank Lahm <franklahm@googlemail.com>
Wed, 11 Jan 2012 14:45:29 +0000 (15:45 +0100)
committerFrank Lahm <franklahm@googlemail.com>
Wed, 11 Jan 2012 14:45:29 +0000 (15:45 +0100)
1  2 
etc/cnid_dbd/comm.c
etc/cnid_dbd/usockfd.c

diff --combined etc/cnid_dbd/comm.c
index 23c6a58edaa18cfdeef1189759c047453ffd2416,6df044624662f0e678cf079b78f5c196cc5b7481..7cd8f5598c7cff49930ac147f799e7dea1d210bb
@@@ -28,6 -28,7 +28,7 @@@
  #include <atalk/logger.h>
  #include <atalk/util.h>
  #include <atalk/cnid_dbd_private.h>
+ #include <atalk/compat.h>
  
  #include "db_param.h"
  #include "usockfd.h"
@@@ -210,7 -211,7 +211,7 @@@ int comm_rcv(struct cnid_dbd_rqst *rqst
          return -1;
      }
  
 -    nametmp = rqst->name;
 +    nametmp = (char *)rqst->name;
      if ((b = readt(cur_fd, rqst, sizeof(struct cnid_dbd_rqst), 1, CNID_DBD_TIMEOUT))
          != sizeof(struct cnid_dbd_rqst)) {
          if (b)
          return 0;
      }
      rqst->name = nametmp;
 -    if (rqst->namelen && readt(cur_fd, rqst->name, rqst->namelen, 1, CNID_DBD_TIMEOUT)
 +    if (rqst->namelen && readt(cur_fd, (char *)rqst->name, rqst->namelen, 1, CNID_DBD_TIMEOUT)
          != rqst->namelen) {
          LOG(log_error, logtype_cnid, "error reading message name: %s", strerror(errno));
          invalidate_fd(cur_fd);
      }
      /* We set this to make life easier for logging. None of the other stuff
         needs zero terminated strings. */
 -    rqst->name[rqst->namelen] = '\0';
 +    ((char *)(rqst->name))[rqst->namelen] = '\0';
  
      LOG(log_maxdebug, logtype_cnid, "comm_rcv: got %u bytes", b + rqst->namelen);
  
diff --combined etc/cnid_dbd/usockfd.c
index ff1538b340c334c2428457455c8e3cf2bfda9f21,0b119209cf987929f3e268f441584a5d95619d6e..c2e625f6d3b1813862496c32bfcece9303ee5de9
  #include <stdlib.h>
  #include <string.h>
  #include <errno.h>
 -#ifdef HAVE_UNISTD_H
  #include <unistd.h>
 -#endif /* HAVE_UNISTD_H */
  #include <sys/un.h>
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/inet.h>
  #include <netdb.h>
 -
 -#ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
 -#endif /* HAVE_SYS_TYPES_H */
 -#ifdef HAVE_SYS_TIME_H
  #include <sys/time.h>
 -#endif /* HAVE_SYS_TIME_H */
 -
  
  #include <atalk/logger.h>
+ #include <atalk/compat.h>
  #include "usockfd.h"
  
  #include <sys/select.h>