File: read-const-cast.patch

package info (click to toggle)
lookup 1.08b-16
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,792 kB
  • sloc: ansic: 12,639; makefile: 247; perl: 174; sh: 53
file content (13 lines) | stat: -rw-r--r-- 649 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
Index: lookup-1.08b/lib/virtfile.c
===================================================================
--- lookup-1.08b.orig/lib/virtfile.c	1996-07-27 00:03:01.000000000 +0200
+++ lookup-1.08b/lib/virtfile.c	2025-09-29 12:10:00.000000000 +0200
@@ -121,7 +121,7 @@
      /* go to appropriate place in file and read data */
      if (lseek(v->fd, start, SEEK_SET) < 0)
 	 die("bad lseek to %ld of %s: %n\n", (long)start);
-     if (i = read(v->fd, p->text, PAGE_SIZE), i < 0)
+     if (i = read(v->fd, (void *)p->text, PAGE_SIZE), i < 0)
 	 die("bad read of %ld bytes starting at %ld of %s: %n\n",
 	     (long)PAGE_SIZE, (long)start, v->filename);