Hi,

open with O_CREAT needs three parameter but I case in this case, you
only want to open it for reading and not create it if it exists, so I
propose the following patch.

Andreas

--- mi-perfctr.c
+++ mi-perfctr.c
@@ -94,7 +94,7 @@

        MI_DEBUG (("Turning on performance monitoring timer support\n"));

-       if ((perfctr_fd = open ("/proc/self/perfctr", O_RDONLY | O_CREAT)) < 0) 
{
+       if ((perfctr_fd = open ("/proc/self/perfctr", O_RDONLY)) < 0) {
                mi_perror ("Error opening /proc/self/perfctr");
                goto bail;
        }

-- 
 Andreas Jaeger, Director Platform / openSUSE, [EMAIL PROTECTED]
  SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
   Maxfeldstr. 5, 90409 Nürnberg, Germany
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Attachment: pgpC5JWlvyt3V.pgp
Description: PGP signature

_______________________________________________
memprof-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/memprof-list

Reply via email to