I want to compile a program which has lots of 32-bit static libraries which I cannot recompile to 64-bit because the lack of makefiles but there are some libraries that I should compile to obtain some static libraries to use alongside them. One of the libraries that I want to compile has a Makefile as follows : Which results in
Tag: c++
C sockets
The following C program calls select() to get a list of client sockets that have data in the socket buffer (using UNIX domain datagram sockets). It takes four parameters on call from a NASM program. The parameter fds_array[] is a 3-element integer array created in NASM and passed into the program. The data are passed in from NASM in rdi,
BUG: unable to handle kernel paging request when accessing a custom struct in syscall
Using linux with kernel 4.4.21, I was required to implement a system call which has a custom struct’s pointer among its parameters. These are the files to to edit: I put sys_procmem.c (implementation) in linux-4.4.21/kernel/sys_procmem.c (sys_procmem.o added in that dir’s Makefile): Test: Both were killed miserably. dmesg: This was done inside a 64-bit Ubuntu 14.04 virtual machine. My friends had
can you guys help me to debug a simple c program with gcc and make it work? (student problems..) [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question Hello guys so my question is can you help me to debug a simple c program with gcc and make it work? The teacher gave
C++ | How to get input from the arrow keys with Linux
I’m super new to C++ and was wanting to add arrow key functionality to my snake game. I’ve been scouring the Internet trying to find a way to do this without “conio.h” as I am using Linux. How would I go about doing this and can I get some example code? Thank you! Answer You’d be best off using ncurses
Pipe not reading what it should
So I have 2 processes, a client who gets 2 operands and one operation (either + or -), sends them to the second process, the server, who makes the computation, then sends the result back to the client. This is the client: This is the server: There are 3 outcomes to this code. First one is that it works, this
Control doesn’t move next to the select function
i am trying to implement a TCP server that accepts multiple client nodes. However, the control is just stuck at select() and not moving beyond that. This is my code: However, the control never moves beyond the select statement. It just remain there even after i open a connection to the server with telnet: Why it stuck there and how
How to avoid quotes (“…”) in shortcut-ed printk Macros inside Linux Kernel Modules
I have created a set of shortcut Macros for Linux Kernel printk to prefix with the module name and to have a set of aliases for severity. Using those Macros like this: Now the issue is that the final output in the Kernel Ring Buffer get quoted in the following way: Do you have any idea of how to avoid
TCP echo server doesn’t accept client
I’m trying to make an echo client server in C. The problem is, when I start the server and run the client code, in client shell it says “Connected” but in server shell it still says “Waiting for connection”. (Server doesn’t say “accept failed”. It says “Waiting for connection” forever). I think server is not accepting client and therefore if
How to implement a timer for every second with zero nanosecond with liburing?
I noticed the io_uring kernel side uses CLOCK_MONOTONIC at CLOCK_MONOTONIC, so for the first timer, I get the time with both CLOCK_REALTIME and CLOCK_MONOTONIC and adjust the nanosecond like below and use IORING_TIMEOUT_ABS flag for io_uring_prep_timeout. iorn/clock.c at master ยท hnakamur/iorn From the second time, I just increment the second part tv_sec and use IORING_TIMEOUT_ABS flag for io_uring_prep_timeout. Here is