Blog

CPM with Ubuntu Karmic compilation issue & solutions

Tags: compilationCPMfcntl.h

Published on: December 11, 2009 by George K.

CPM with Ubuntu Karmic compilation issue & solutions

Scenario:

On Ubuntu karmic compilation you may get errors as following and let us see how to fix it,

In file included from /usr/include/fcntl.h:217,
from cpm.h:35,
from security.c:27:
In function ‘open’,
inlined from ‘initSecurity’ at security.c:498:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make: *** [security.o] Error 1

As usual, the above message clearly states the issue with the code — error: open with O_CREAT in second argument needs 3 arguments

Solution is to edit line 498 of security.c and edited the line

canary = open(“/dev/null”, O_CREAT);

to reflect

canary = open(“/dev/null”, O_CREAT, 0666);

I had to edit this file to get cpm working on my local machine with Ubuntu Karmic installed.

Category : Linux

George K.

George K.

George started his career in web hosting and Linux technical support in the year 2004 and is with SupportSages since 2009. He has keen interest in server optimizations, custom security solutions, hacked server recovery, cyber forensic and high availability fail over system design and implementation. George loves long drives and is passionate about art and literature.

You may also read:

Comments

Add new commentSIGN IN

Let's Connect

Categories

Your Cart

Cart is empty.

Subtotal
₹0.00
APPLY
0
Send this to a friend