CPM with Ubuntu Karmic compilation issue & solutions

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.

Post to Twitter Tweet This Post

Related posts:

  1. ’scp’ permission issue : simple fix!
  2. MSSQL – Two common issues while restoring a backup and it’s solutions
  3. Source compilation of Apache
  4. Chapter 11 Basic Shell Scripting in Linux!
  5. How to create a local Ubuntu repository, update/upgrade distros ‘locally’ and thereby save bandwidth

Comment Form

About this blog

This blog, acts as a knowledge repository for the world and is unofficial! Anything we find interesting in the cyber world will go here. Most cases, this blog will reflect the happiness of our staff in reaching successful solution to an issue (s)he worked on. A reference for other fellow SAGEs who come across similar issues later