Port-macppc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
netatalk 2.2.4 timestamps on NetBSD 6.0 fixed
Following up with the 2.2.4 netatalk version of the patch so it
will build, install and run on NetBSD 6.0.x. I have not tried to
do this on 5.x, or 6.1.
The #defines are a little hacky, but they work.
The meat of the change is the 64-bit-ism in volume.c where it
was only copying the upper part of the 64-bit integer - normally
zero - hence the 13.5 year delta.
I downloaded netatalk-2.2.4.tar.gz, unwrapped it, and did:
./configure --with-bdb=/usr/pkg --enable-netbsd
make
make install
Now it works, and everything.
Thanks all for your help,
-dgl-
----- patch for netatalk 2.2.4 -----
=============== ./bin/afppasswd/afppasswd.c ================
--- netatalk-2.2.4.clean/./bin/afppasswd/afppasswd.c 2012-03-14
05:15:10.000000000 -0500
+++ netatalk-2.2.4/./bin/afppasswd/afppasswd.c 2013-05-29 14:42:30.000000000
-0500
@@ -42,6 +42,11 @@
#include <des.h>
+#define Key_schedule DES_key_schedule
+#define key_sched(kkkk, ssss) DES_key_sched((kkkk), &(ssss))
+#define ecb_encrypt(nnnn1, nnnn2, ssss, ffff) DES_ecb_encrypt((nnnn1),
(nnnn2), &(ssss), (ffff))
+#define C_Block DES_cblock
+
#ifdef USE_CRACKLIB
#include <crack.h>
#endif /* USE_CRACKLIB */
=============== ./distrib/initscripts/Makefile.in ================
--- netatalk-2.2.4.clean/./distrib/initscripts/Makefile.in 2012-09-28
02:49:25.000000000 -0500
+++ netatalk-2.2.4/./distrib/initscripts/Makefile.in 2013-05-29
23:05:32.000000000 -0500
@@ -723,23 +723,23 @@
@USE_TRU64_TRUE@uninstall-startup: uninstall-am
@USE_NETBSD_TRUE@afpd: rc.afpd.netbsd
-@USE_NETBSD_TRUE@ cp -f $< $@
+@USE_NETBSD_TRUE@ cp -f rc.afpd.netbsd $@
@USE_NETBSD_TRUE@ chmod a+x $@
@USE_NETBSD_TRUE@atalkd: rc.atalkd.netbsd
-@USE_NETBSD_TRUE@ cp -f $< $@
+@USE_NETBSD_TRUE@ cp -f rc.atalkd.netbsd $@
@USE_NETBSD_TRUE@ chmod a+x $@
@USE_NETBSD_TRUE@cnid_metad: rc.cnid_metad.netbsd
-@USE_NETBSD_TRUE@ cp -f $< $@
+@USE_NETBSD_TRUE@ cp -f rc.cnid_metad.netbsd $@
@USE_NETBSD_TRUE@ chmod a+x $@
@USE_NETBSD_TRUE@papd: rc.papd.netbsd
-@USE_NETBSD_TRUE@ cp -f $< $@
+@USE_NETBSD_TRUE@ cp -f rc.papd.netbsd $@
@USE_NETBSD_TRUE@ chmod a+x $@
@USE_NETBSD_TRUE@timelord: rc.timelord.netbsd
-@USE_NETBSD_TRUE@ cp -f $< $@
+@USE_NETBSD_TRUE@ cp -f rc.timelord.netbsd $@
@USE_NETBSD_TRUE@ chmod a+x $@
@USE_NETBSD_TRUE@install-data-hook:
=============== ./etc/afpd/volume.c ================
--- netatalk-2.2.4.clean/./etc/afpd/volume.c 2012-09-10 04:34:52.000000000
-0500
+++ netatalk-2.2.4/./etc/afpd/volume.c 2013-05-29 14:59:14.000000000 -0500
@@ -2012,6 +2012,7 @@
char *data;
char *namebuf;
int vcnt;
+ int aint;
size_t len;
load_volumes(obj);
@@ -2068,12 +2069,13 @@
*rbuflen = data - rbuf;
data = rbuf;
if ( gettimeofday( &tv, NULL ) < 0 ) {
- LOG(log_error, logtype_afpd, "afp_getsrvrparms(%s): gettimeofday: %s",
volume->v_path, strerror(errno) );
+ /* volume is NULL at this point. No point in segfaulting on error */
+ LOG(log_error, logtype_afpd, "afp_getsrvrparms(): gettimeofday: %s",
strerror(errno) );
*rbuflen = 0;
return AFPERR_PARAM;
}
- tv.tv_sec = AD_DATE_FROM_UNIX(tv.tv_sec);
- memcpy(data, &tv.tv_sec, sizeof( u_int32_t));
+ aint = AD_DATE_FROM_UNIX(tv.tv_sec);
+ memcpy(data, &aint, sizeof( u_int32_t));
data += sizeof( u_int32_t);
*data = vcnt;
return( AFP_OK );
=============== ./etc/uams/uams_randnum.c ================
--- netatalk-2.2.4.clean/./etc/uams/uams_randnum.c 2012-03-14
05:15:11.000000000 -0500
+++ netatalk-2.2.4/./etc/uams/uams_randnum.c 2013-05-29 14:54:45.000000000
-0500
@@ -46,6 +46,10 @@
#include <atalk/afp.h>
#include <atalk/uam.h>
+#define Key_schedule DES_key_schedule
+#define key_sched(kkkk, ssss) DES_key_sched((kkkk), &(ssss))
+#define ecb_encrypt(nnnn1, nnnn2, ssss, ffff) DES_ecb_encrypt((nnnn1),
(nnnn2), &(ssss), (ffff))
+#define C_Block DES_cblock
#include <des.h>
Home |
Main Index |
Thread Index |
Old Index