rsynd-2.5.1 / hlink.c patches

John E. Malmberg wb8tyw at
Sun Jan 13 12:40:05 EST 2002

Platform: Compaq OpenVMS Alpha 7.3
Compiler: Compaq C T6.5

The following patch resolves compile problems with the HLINK.C module.

The cast on function argument for the qsort() routine was wrong, and not 
  allowing the compile to complete.

When the function definiton of the hlink_compare() is corrected to have 
the const qualifiers, the cast inside the qsort() function call is no 
longer needed.

wb8tyw at
Personal Opinion Only

EAGLE> gdiff -u ref_src:hlink.c lcl_src:hlink.c_unix
--- ref_src:hlink.c     Sat Jan  5 13:27:03 2002
+++ lcl_src:hlink.c_unix        Sat Jan 12 19:28:00 2002
@@ -23,7 +23,8 @@
  extern int verbose;

-static int hlink_compare(struct file_struct *f1,struct file_struct *f2)
+static int hlink_compare
+   (const struct file_struct *f1, const struct file_struct *f2)
    if (!S_ISREG(f1->mode) && !S_ISREG(f2->mode)) return 0;
    if (!S_ISREG(f1->mode)) return -1;
@@ -60,7 +61,7 @@

-             (int (*)())hlink_compare);
+             (hlink_compare);


More information about the rsync mailing list