Ignore:
Timestamp:
Jun 19, 2008, 1:36:52 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • Do not build grab.c conditionally; instead, make grab_process() and create_pty_grab() return an error if the feature isn't available.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/grab.c

    r2452 r2455  
    77#include <unistd.h>
    88
    9 #include <sys/ioctl.h>
    10 #include <sys/ptrace.h>
    11 #include <sys/stat.h>
    12 #include <sys/syscall.h>
    13 #include <sys/user.h>
    14 #include <sys/wait.h>
    15 
    16 #include <linux/kdev_t.h>
    17 #include <linux/major.h>
     9#if defined USE_GRAB
     10#   include <sys/ioctl.h>
     11#   include <sys/ptrace.h>
     12#   include <sys/stat.h>
     13#   include <sys/syscall.h>
     14#   include <sys/user.h>
     15#   include <sys/wait.h>
     16
     17#   include <linux/kdev_t.h>
     18#   include <linux/major.h>
     19#endif
    1820
    1921#include "neercs.h"
    2022
     23#if defined USE_GRAB
    2124static int memcpy_from_target(pid_t pid, void* dest, void* src, size_t n)
    2225{
     
    220223    return 0;
    221224}
     225#endif
    222226
    223227int grab_process(pid_t pid, char *ptyname, int ptyfd)
    224228{
     229#if defined USE_GRAB
    225230    int i, fd = 0, mode, ret;
    226231    char fdstr[1024];
     
    288293
    289294    return 0;
    290 }
     295#else
     296    return -1;
     297#endif
     298}
     299
Note: See TracChangeset for help on using the changeset viewer.