Bug 78709

Summary: any2ppm fails to build on architectures without MMU
Product: cairo Reporter: Eric Le Bihan <eric.le.bihan.dev>
Component: generalAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium CC: nravi.n
Version: 1.12.10   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Add check for fork() when compiling any2ppm as daemon
Updated version of any2ppm fix for no-MMU platforms

Description Eric Le Bihan 2014-05-14 20:36:12 UTC
Created attachment 99045 [details]
Add check for fork() when compiling any2ppm as daemon

When trying to build cairo for the Microblaze platform, the compilation of any2ppm fails because fork() is not available as this architecture does not have a MMU.

The attached patch adds a check for fork() if any2ppm should be compiled to run as daemon.
Comment 1 Eric Le Bihan 2014-05-15 07:37:42 UTC
(In reply to comment #0)
> Created attachment 99045 [details]
> Add check for fork() when compiling any2ppm as daemon
> 
> When trying to build cairo for the Microblaze platform, the compilation of
> any2ppm fails because fork() is not available as this architecture does not
> have a MMU.
Oops, I mean Blackfin, not Microblaze.
Comment 2 Ravi Nanjundappa 2014-05-15 08:32:53 UTC
Comment on attachment 99045 [details]
Add check for fork() when compiling any2ppm as daemon

I feel conditional checking of HAVE_FORK macro, should be seperated out. Because in the above patch, HAVE_FORK has been added in the conditional checking of header file related macros.

How about the below change ? 


diff --git a/test/any2ppm.c b/test/any2ppm.c
index b125496..3e0806f 100644
--- a/test/any2ppm.c
+++ b/test/any2ppm.c
@@ -92,8 +92,10 @@
 #define SOCKET_PATH "./.any2ppm"
 #define TIMEOUT 60000 /* 60 seconds */

+#if HAVE_FORK
 #define CAN_RUN_AS_DAEMON 1
 #endif
+#endif

 #define ARRAY_LENGTH(A) (sizeof (A) / sizeof (A[0]))
Comment 3 Eric Le Bihan 2014-05-18 13:28:25 UTC
Created attachment 99273 [details] [review]
Updated version of any2ppm fix for no-MMU platforms
Comment 4 Ravi Nanjundappa 2014-05-21 04:22:58 UTC
Comment on attachment 99273 [details] [review]
Updated version of any2ppm fix for no-MMU platforms

Review of attachment 99273 [details] [review]:
-----------------------------------------------------------------

Looks good. But please test and share the results of this patch on an environment not supporting fork() or MMU.
Comment 5 Bryce Harrington 2014-06-05 23:10:33 UTC
Thanks, applied.
Comment 6 Ravi Nanjundappa 2014-06-06 03:49:49 UTC
(In reply to comment #5)
> Thanks, applied.

Thank you Bryce :)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.