Results 1 to 2 of 2

Thread: you know how to do this..

  1. #1

    you know how to do this..

    Just wanted to know can anyone apply a patch to a program.
    The patch i want to apply is below but i dont know how to.
    Do i just cut and paste it into the code and if so is it
    between the lines 54,60 and 146,150 and is it just the parts
    of code with + symbols?

    Thanks in advance.


    *** nmblookup.c Thu Jan 30 20:52:47 1997
    --- attack/nmblookup.c Tue Jan 21 01:39:16 1997
    ***************
    *** 54,56 ****
    --- 54,60 ----

    + #ifdef ATTACK
    + ServerFD = open_socket_in(SOCK_DGRAM, 137,3);
    + #else
    ServerFD = open_socket_in(SOCK_DGRAM, 0,3);
    + #endif /* ATTACK */

    ***************
    *** 142,144 ****
    --- 146,150 ----
    strcpy(scope,optarg);
    + #ifndef ATTACK
    strupper(scope);
    + #endif /* ATTACK */
    break;

  2. #2
    Senior Member
    Join Date
    Nov 2001
    Posts
    472
    I'm not sure about this one, but here's what I would do:

    Put the first part so they make lines 54-60, remove '+':
    #ifdef ATTACK
    ServerFD = open_socket_in(SOCK_DGRAM, 137,3);
    #else
    ServerFD = open_socket_in(SOCK_DGRAM, 0,3);
    #endif /* ATTACK */

    Next part, 46-50, remove '+':
    strcpy(scope,optarg);
    #ifndef ATTACK
    strupper(scope);
    #endif /* ATTACK */
    break;

    I dont know bout the 'break;' at the end, but it looks to me you'll get a compile error.
    ---
    proactive

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •